home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-12-13 | 16.3 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Welcome.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Dec 13 01:30:36 1993, modified Mon Dec 13 01:30:36 1993, creator Think C, type ASCII, 15919 bytes "Welcome.c" , at 0x3eaf 490 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 57 65 6c 63 6f 6d | 65 2e 63 00 00 00 00 00 |..Welcom|e.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 3e 2f 00 | 00 01 ea a9 31 bc 8c a9 |.....>/.|....1...|
|00000060| 31 bc 8c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |1.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 40 5b 00 00 |........|....@[..|
|00000080| 2f 2a 09 57 65 6c 63 6f | 6d 65 21 0d 0d 09 57 65 |/*.Welco|me!...We|
|00000090| 6c 63 6f 6d 65 20 69 73 | 20 61 6e 20 72 65 63 72 |lcome is| an recr|
|000000a0| 65 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 57 65 |eation o|f the We|
|000000b0| 6c 63 6f 6d 65 32 20 61 | 70 70 6c 69 63 61 74 69 |lcome2 a|pplicati|
|000000c0| 6f 6e 20 75 73 69 6e 67 | 20 74 68 65 20 6e 65 77 |on using| the new|
|000000d0| 20 53 70 65 65 63 68 20 | 4d 61 6e 61 67 65 72 2e | Speech |Manager.|
|000000e0| 0d 49 20 68 61 76 65 20 | 6e 6f 20 63 6f 6e 6e 65 |.I have |no conne|
|000000f0| 63 74 69 6f 6e 20 77 69 | 74 68 20 74 68 65 20 6f |ction wi|th the o|
|00000100| 72 69 67 69 6e 61 6c 20 | 61 75 74 68 6f 72 2c 20 |riginal |author, |
|00000110| 65 78 63 65 70 74 20 66 | 6f 6e 64 20 6d 65 6d 6f |except f|ond memo|
|00000120| 72 69 65 73 2e 20 3a 2d | 29 0d 0d 43 6f 70 79 72 |ries. :-|)..Copyr|
|00000130| 69 67 68 74 20 31 39 39 | 33 20 62 79 20 47 61 72 |ight 199|3 by Gar|
|00000140| 72 65 74 74 20 46 69 74 | 7a 67 65 72 61 6c 64 0d |rett Fit|zgerald.|
|00000150| 41 20 70 72 6f 64 75 63 | 74 20 6f 66 20 64 6f 6e |A produc|t of don|
|00000160| 6e 61 65 6c 20 53 6f 66 | 74 77 61 72 65 0d 0d 76 |nael Sof|tware..v|
|00000170| 31 2e 33 2e 32 09 2d 09 | 41 64 64 73 20 48 61 6c |1.3.2.-.|Adds Hal|
|00000180| 6c 6f 77 65 65 6e 20 28 | 41 52 47 48 21 29 20 61 |loween (|ARGH!) a|
|00000190| 6e 64 20 66 69 78 65 73 | 20 62 75 67 20 69 6e 20 |nd fixes| bug in |
|000001a0| 73 65 6c 65 63 74 69 6f | 6e 20 6f 66 20 64 61 79 |selectio|n of day|
|000001b0| 2d 6f 66 2d 77 65 65 6b | 20 68 6f 6c 69 64 61 79 |-of-week| holiday|
|000001c0| 73 20 2d 20 31 32 2f 31 | 32 2f 39 33 0d 09 09 09 |s - 12/1|2/93....|
|000001d0| 41 6c 73 6f 20 66 69 78 | 65 64 20 4d 75 6e 67 65 |Also fix|ed Munge|
|000001e0| 72 20 62 75 67 2d 2d 62 | 72 6f 75 67 68 74 20 62 |r bug--b|rought b|
|000001f0| 61 63 6b 20 66 72 6f 6d | 20 76 32 2e 30 64 20 28 |ack from| v2.0d (|
|00000200| 74 6f 20 61 70 70 65 61 | 72 20 6c 61 74 65 72 2e |to appea|r later.|
|00000210| 2e 2e 29 0d 76 31 2e 33 | 2e 31 09 2d 09 41 64 64 |..).v1.3|.1.-.Add|
|00000220| 65 64 20 46 6c 75 73 68 | 45 76 65 6e 74 73 20 63 |ed Flush|Events c|
|00000230| 61 6c 6c 2c 20 62 75 74 | 20 69 74 20 64 69 64 6e |all, but| it didn|
|00000240| 27 74 20 68 65 6c 70 2e | 20 54 68 65 20 53 70 65 |'t help.| The Spe|
|00000250| 65 63 68 20 4d 61 6e 61 | 67 65 72 20 64 6f 65 73 |ech Mana|ger does|
|00000260| 6e 27 74 0d 09 09 09 73 | 65 65 6d 20 74 6f 6f 20 |n't....s|eem too |
|00000270| 68 61 70 70 79 20 77 69 | 74 68 20 4d 61 6c 65 20 |happy wi|th Male |
|00000280| 56 6f 69 63 65 20 61 6e | 64 20 6f 6e 6c 79 20 34 |Voice an|d only 4|
|00000290| 4d 20 52 41 4d 2e 2e 2e | 2e 0d 76 31 2e 33 09 2d |M RAM...|..v1.3.-|
|000002a0| 09 4d 65 6e 75 20 73 65 | 6c 65 63 74 69 6f 6e 20 |.Menu se|lection |
|000002b0| 6f 66 20 66 75 74 75 72 | 65 20 64 65 66 61 75 6c |of futur|e defaul|
|000002c0| 74 20 76 6f 69 63 65 20 | 77 6f 72 6b 73 21 20 09 |t voice |works! .|
|000002d0| 2d 09 38 2f 32 35 2f 39 | 33 0d 76 31 2e 32 09 2d |-.8/25/9|3.v1.2.-|
|000002e0| 09 53 68 6f 77 20 73 70 | 65 61 6b 69 6e 67 20 76 |.Show sp|eaking v|
|000002f0| 6f 69 63 65 09 09 2d 09 | 38 2f 32 32 2f 39 33 0d |oice..-.|8/22/93.|
|00000300| 09 09 09 45 72 72 6f 72 | 20 61 6c 65 72 74 73 0d |...Error| alerts.|
|00000310| 09 09 09 47 65 73 74 61 | 6c 74 20 6e 6f 77 20 77 |...Gesta|lt now w|
|00000320| 6f 72 6b 73 2c 20 77 69 | 74 68 20 69 6e 63 6c 75 |orks, wi|th inclu|
|00000330| 73 69 6f 6e 20 6f 66 20 | 3c 47 65 73 74 61 6c 74 |sion of |<Gestalt|
|00000340| 45 71 75 2e 68 3e 0d 09 | 09 09 4c 69 73 74 73 20 |Equ.h>..|..Lists |
|00000350| 76 6f 69 63 65 73 0d 09 | 09 09 41 64 64 65 64 20 |voices..|..Added |
|00000360| 61 62 6f 75 74 20 62 6f | 78 0d 09 09 09 44 65 66 |about bo|x....Def|
|00000370| 61 75 6c 74 73 20 74 6f | 20 22 46 65 6d 61 6c 65 |aults to| "Female|
|00000380| 20 56 6f 69 63 65 22 2c | 20 69 66 20 61 76 61 69 | Voice",| if avai|
|00000390| 6c 61 62 6c 65 0d 76 31 | 2e 31 2e 31 09 2d 09 49 |lable.v1|.1.1.-.I|
|000003a0| 6e 63 72 65 61 73 65 64 | 20 61 70 70 20 70 61 72 |ncreased| app par|
|000003b0| 74 69 74 69 6f 6e 20 74 | 6f 20 70 65 72 6d 69 74 |tition t|o permit|
|000003c0| 20 6d 6f 72 65 20 63 6f | 6d 70 6c 69 63 61 74 65 | more co|mplicate|
|000003d0| 64 20 76 6f 69 63 65 73 | 09 2d 09 38 2f 31 36 2f |d voices|.-.8/16/|
|000003e0| 39 33 0d 09 09 09 43 68 | 61 6e 67 65 64 20 74 6f |93....Ch|anged to|
|000003f0| 20 53 74 6f 70 53 70 65 | 65 63 68 41 74 20 65 6e | StopSpe|echAt en|
|00000400| 64 20 6f 66 20 77 6f 72 | 64 0d 09 09 09 41 64 64 |d of wor|d....Add|
|00000410| 65 64 20 63 6f 6d 6d 61 | 73 20 61 66 74 65 72 20 |ed comma|s after |
|00000420| 77 65 65 6b 64 61 79 0d | 09 09 09 52 65 2d 64 69 |weekday.|...Re-di|
|00000430| 64 20 46 69 6e 64 65 72 | 20 69 63 6f 6e 0d 76 31 |d Finder| icon.v1|
|00000440| 2e 31 09 2d 09 41 64 64 | 65 64 20 57 61 69 74 4e |.1.-.Add|ed WaitN|
|00000450| 65 78 74 45 76 65 6e 74 | 20 74 6f 20 61 6c 6c 6f |extEvent| to allo|
|00000460| 77 20 71 75 69 74 74 69 | 6e 67 09 2d 09 38 2f 31 |w quitti|ng.-.8/1|
|00000470| 36 2f 39 33 0d 76 31 2e | 30 09 2d 09 69 6e 69 74 |6/93.v1.|0.-.init|
|00000480| 69 61 6c 20 72 65 6c 65 | 61 73 65 09 2d 09 38 2f |ial rele|ase.-.8/|
|00000490| 31 35 2f 39 33 0d 2a 2f | 0d 0d 23 69 6e 63 6c 75 |15/93.*/|..#inclu|
|000004a0| 64 65 20 22 57 65 6c 63 | 6f 6d 65 2e 68 22 0d 73 |de "Welc|ome.h".s|
|000004b0| 68 6f 72 74 20 76 6f 6c | 5f 72 65 66 6e 75 6d 2c |hort vol|_refnum,|
|000004c0| 0d 09 20 20 70 72 65 66 | 73 5f 66 69 6c 65 5f 72 |.. pref|s_file_r|
|000004d0| 65 66 6e 75 6d 3b 0d 0d | 2f 2a 09 74 6f 6f 6c 62 |efnum;..|/*.toolb|
|000004e0| 6f 78 5f 69 6e 69 74 28 | 29 0d 09 0d 09 49 6e 69 |ox_init(|)....Ini|
|000004f0| 74 69 61 6c 69 7a 65 73 | 20 74 68 65 20 66 75 6c |tializes| the ful|
|00000500| 6c 20 74 6f 6f 6c 62 6f | 78 2d 2d 74 68 69 6e 67 |l toolbo|x--thing|
|00000510| 73 20 68 65 72 65 20 73 | 65 65 6d 20 74 6f 20 64 |s here s|eem to d|
|00000520| 65 70 65 6e 64 20 6f 6e | 20 69 74 2e 0d 2a 2f 0d |epend on| it..*/.|
|00000530| 0d 74 6f 6f 6c 62 6f 78 | 5f 69 6e 69 74 28 29 0d |.toolbox|_init().|
|00000540| 7b 0d 0d 09 49 6e 69 74 | 47 72 61 66 28 26 74 68 |{...Init|Graf(&th|
|00000550| 65 50 6f 72 74 29 3b 09 | 0d 09 49 6e 69 74 46 6f |ePort);.|..InitFo|
|00000560| 6e 74 73 28 29 3b 0d 09 | 49 6e 69 74 57 69 6e 64 |nts();..|InitWind|
|00000570| 6f 77 73 28 29 3b 0d 09 | 49 6e 69 74 4d 65 6e 75 |ows();..|InitMenu|
|00000580| 73 28 29 3b 0d 09 54 45 | 49 6e 69 74 28 29 3b 0d |s();..TE|Init();.|
|00000590| 09 49 6e 69 74 44 69 61 | 6c 6f 67 73 28 6e 69 6c |.InitDia|logs(nil|
|000005a0| 29 3b 0d 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |);..Init|Cursor()|
|000005b0| 3b 0d 7d 0d 0d 2f 2a 09 | 70 72 65 66 73 5f 69 6e |;.}../*.|prefs_in|
|000005c0| 69 74 28 29 0d 09 0d 09 | 46 69 6e 64 73 20 74 68 |it()....|Finds th|
|000005d0| 65 20 57 65 6c 63 6f 6d | 65 21 20 70 72 65 66 65 |e Welcom|e! prefe|
|000005e0| 72 65 6e 63 65 73 20 66 | 69 6c 65 2c 20 6f 72 20 |rences f|ile, or |
|000005f0| 63 72 65 61 74 65 73 20 | 61 20 6e 65 77 20 6f 6e |creates |a new on|
|00000600| 65 2e 20 52 65 74 75 72 | 6e 73 20 74 72 75 65 20 |e. Retur|ns true |
|00000610| 69 66 20 66 69 6c 65 0d | 65 78 69 73 74 73 2c 20 |if file.|exists, |
|00000620| 66 61 6c 73 65 20 69 66 | 20 74 68 65 20 70 72 65 |false if| the pre|
|00000630| 66 73 20 66 6f 6c 64 65 | 72 20 63 61 6e 27 74 20 |fs folde|r can't |
|00000640| 62 65 20 66 6f 75 6e 64 | 20 6f 72 20 74 68 65 20 |be found| or the |
|00000650| 66 69 6c 65 20 63 61 6e | 27 74 20 62 65 20 6f 70 |file can|'t be op|
|00000660| 65 6e 65 64 2e 0d 2a 2f | 0d 0d 42 6f 6f 6c 65 61 |ened..*/|..Boolea|
|00000670| 6e 0d 70 72 65 66 73 5f | 69 6e 69 74 28 29 0d 0d |n.prefs_|init()..|
|00000680| 7b 0d 09 4f 53 45 72 72 | 20 65 72 72 3b 0d 09 53 |{..OSErr| err;..S|
|00000690| 74 72 69 6e 67 48 61 6e | 64 6c 65 20 76 6f 6c 5f |tringHan|dle vol_|
|000006a0| 6e 61 6d 65 3b 0d 09 6c | 6f 6e 67 20 70 72 65 66 |name;..l|ong pref|
|000006b0| 73 5f 64 69 72 3b 0d 09 | 46 53 53 70 65 63 20 70 |s_dir;..|FSSpec p|
|000006c0| 72 65 66 73 5f 73 70 65 | 63 3b 0d 09 48 61 6e 64 |refs_spe|c;..Hand|
|000006d0| 6c 65 20 76 6f 69 63 65 | 5f 72 65 73 3b 0d 09 56 |le voice|_res;..V|
|000006e0| 6f 69 63 65 53 70 65 63 | 20 69 6e 69 74 5f 76 6f |oiceSpec| init_vo|
|000006f0| 69 63 65 5f 72 65 73 3b | 0d 09 65 78 74 65 72 6e |ice_res;|..extern|
|00000700| 20 73 68 6f 72 74 20 70 | 72 65 66 73 5f 66 69 6c | short p|refs_fil|
|00000710| 65 5f 72 65 66 6e 75 6d | 2c 0d 09 09 09 09 20 76 |e_refnum|,..... v|
|00000720| 6f 6c 5f 72 65 66 6e 75 | 6d 3b 0d 09 0d 09 76 6f |ol_refnu|m;....vo|
|00000730| 6c 5f 6e 61 6d 65 20 3d | 20 4e 65 77 53 74 72 69 |l_name =| NewStri|
|00000740| 6e 67 28 22 5c 70 22 29 | 3b 0d 09 65 72 72 20 3d |ng("\p")|;..err =|
|00000750| 20 46 69 6e 64 46 6f 6c | 64 65 72 28 6b 4f 6e 53 | FindFol|der(kOnS|
|00000760| 79 73 74 65 6d 44 69 73 | 6b 2c 20 6b 50 72 65 66 |ystemDis|k, kPref|
|00000770| 65 72 65 6e 63 65 73 46 | 6f 6c 64 65 72 54 79 70 |erencesF|olderTyp|
|00000780| 65 2c 20 6b 44 6f 6e 74 | 43 72 65 61 74 65 46 6f |e, kDont|CreateFo|
|00000790| 6c 64 65 72 2c 0d 09 09 | 09 09 09 20 26 76 6f 6c |lder,...|... &vol|
|000007a0| 5f 72 65 66 6e 75 6d 2c | 20 26 70 72 65 66 73 5f |_refnum,| &prefs_|
|000007b0| 64 69 72 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |dir);..i|f (err !|
|000007c0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 72 65 74 75 72 |= noErr)|...retur|
|000007d0| 6e 20 66 61 6c 73 65 3b | 0d 09 0d 09 65 72 72 20 |n false;|....err |
|000007e0| 3d 20 46 53 4d 61 6b 65 | 46 53 53 70 65 63 28 76 |= FSMake|FSSpec(v|
|000007f0| 6f 6c 5f 72 65 66 6e 75 | 6d 2c 20 70 72 65 66 73 |ol_refnu|m, prefs|
|00000800| 5f 64 69 72 2c 20 50 52 | 45 46 53 5f 46 49 4c 45 |_dir, PR|EFS_FILE|
|00000810| 5f 4e 41 4d 45 2c 20 26 | 70 72 65 66 73 5f 73 70 |_NAME, &|prefs_sp|
|00000820| 65 63 29 3b 0d 09 0d 09 | 69 66 20 28 65 72 72 20 |ec);....|if (err |
|00000830| 3d 3d 20 66 6e 66 45 72 | 72 29 20 7b 0d 09 09 46 |== fnfEr|r) {...F|
|00000840| 53 70 43 72 65 61 74 65 | 52 65 73 46 69 6c 65 28 |SpCreate|ResFile(|
|00000850| 26 70 72 65 66 73 5f 73 | 70 65 63 2c 20 27 47 53 |&prefs_s|pec, 'GS|
|00000860| 46 43 27 2c 20 27 70 72 | 65 66 27 2c 20 73 6d 53 |FC', 'pr|ef', smS|
|00000870| 79 73 74 65 6d 53 63 72 | 69 70 74 29 3b 0d 09 09 |ystemScr|ipt);...|
|00000880| 65 72 72 20 3d 20 52 65 | 73 45 72 72 6f 72 28 29 |err = Re|sError()|
|00000890| 3b 0d 09 09 69 66 20 28 | 65 72 72 20 21 3d 20 6e |;...if (|err != n|
|000008a0| 6f 45 72 72 29 20 7b 0d | 09 09 09 46 53 70 44 65 |oErr) {.|...FSpDe|
|000008b0| 6c 65 74 65 28 26 70 72 | 65 66 73 5f 73 70 65 63 |lete(&pr|efs_spec|
|000008c0| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 20 66 61 6c |);....re|turn fal|
|000008d0| 73 65 3b 0d 09 09 7d 0d | 09 09 70 72 65 66 73 5f |se;...}.|..prefs_|
|000008e0| 66 69 6c 65 5f 72 65 66 | 6e 75 6d 20 3d 20 46 53 |file_ref|num = FS|
|000008f0| 70 4f 70 65 6e 52 65 73 | 46 69 6c 65 28 26 70 72 |pOpenRes|File(&pr|
|00000900| 65 66 73 5f 73 70 65 63 | 2c 20 66 73 52 64 57 72 |efs_spec|, fsRdWr|
|00000910| 50 65 72 6d 29 3b 0d 09 | 09 65 72 72 20 3d 20 52 |Perm);..|.err = R|
|00000920| 65 73 45 72 72 6f 72 28 | 29 3b 0d 09 09 69 66 20 |esError(|);...if |
|00000930| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 20 7b |(err != |noErr) {|
|00000940| 0d 09 09 09 46 53 70 44 | 65 6c 65 74 65 28 26 70 |....FSpD|elete(&p|
|00000950| 72 65 66 73 5f 73 70 65 | 63 29 3b 0d 09 09 09 72 |refs_spe|c);....r|
|00000960| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 09 09 7d |eturn fa|lse;...}|
|00000970| 0d 09 09 0d 09 09 69 6e | 69 74 5f 76 6f 69 63 65 |......in|it_voice|
|00000980| 5f 72 65 73 2e 63 72 65 | 61 74 6f 72 20 3d 20 27 |_res.cre|ator = '|
|00000990| 3f 3f 3f 3f 27 3b 0d 09 | 09 69 6e 69 74 5f 76 6f |????';..|.init_vo|
|000009a0| 69 63 65 5f 72 65 73 2e | 69 64 20 3d 20 27 3f 3f |ice_res.|id = '??|
|000009b0| 3f 3f 27 3b 0d 09 09 50 | 74 72 54 6f 48 61 6e 64 |??';...P|trToHand|
|000009c0| 28 28 50 74 72 29 26 69 | 6e 69 74 5f 76 6f 69 63 |((Ptr)&i|nit_voic|
|000009d0| 65 5f 72 65 73 2c 20 26 | 76 6f 69 63 65 5f 72 65 |e_res, &|voice_re|
|000009e0| 73 2c 20 73 69 7a 65 6f | 66 28 56 6f 69 63 65 53 |s, sizeo|f(VoiceS|
|000009f0| 70 65 63 29 29 3b 0d 09 | 09 41 64 64 52 65 73 6f |pec));..|.AddReso|
|00000a00| 75 72 63 65 28 76 6f 69 | 63 65 5f 72 65 73 2c 20 |urce(voi|ce_res, |
|00000a10| 56 4f 49 43 45 5f 52 45 | 53 5f 54 59 50 45 2c 20 |VOICE_RE|S_TYPE, |
|00000a20| 56 4f 49 43 45 5f 52 45 | 53 5f 4e 55 4d 42 2c 20 |VOICE_RE|S_NUMB, |
|00000a30| 22 5c 70 50 72 65 66 65 | 72 72 65 64 20 76 6f 69 |"\pPrefe|rred voi|
|00000a40| 63 65 22 29 3b 0d 09 09 | 57 72 69 74 65 52 65 73 |ce");...|WriteRes|
|00000a50| 6f 75 72 63 65 28 76 6f | 69 63 65 5f 72 65 73 29 |ource(vo|ice_res)|
|00000a60| 3b 0d 09 09 46 6c 75 73 | 68 56 6f 6c 28 2a 76 6f |;...Flus|hVol(*vo|
|00000a70| 6c 5f 6e 61 6d 65 2c 20 | 76 6f 6c 5f 72 65 66 6e |l_name, |vol_refn|
|00000a80| 75 6d 29 3b 0d 09 7d 0d | 09 65 6c 73 65 20 7b 0d |um);..}.|.else {.|
|00000a90| 09 09 70 72 65 66 73 5f | 66 69 6c 65 5f 72 65 66 |..prefs_|file_ref|
|00000aa0| 6e 75 6d 20 3d 20 46 53 | 70 4f 70 65 6e 52 65 73 |num = FS|pOpenRes|
|00000ab0| 46 69 6c 65 28 26 70 72 | 65 66 73 5f 73 70 65 63 |File(&pr|efs_spec|
|00000ac0| 2c 20 66 73 52 64 57 72 | 50 65 72 6d 29 3b 0d 09 |, fsRdWr|Perm);..|
|00000ad0| 09 65 72 72 20 3d 20 52 | 65 73 45 72 72 6f 72 28 |.err = R|esError(|
|00000ae0| 29 3b 0d 09 09 69 66 20 | 28 65 72 72 20 21 3d 20 |);...if |(err != |
|00000af0| 6e 6f 45 72 72 29 20 7b | 0d 09 09 09 72 65 74 75 |noErr) {|....retu|
|00000b00| 72 6e 20 66 61 6c 73 65 | 3b 0d 09 09 7d 0d 09 7d |rn false|;...}..}|
|00000b10| 0d 7d 0d 0d 2f 2a 09 64 | 61 74 65 5f 74 6f 5f 74 |.}../*.d|ate_to_t|
|00000b20| 65 78 74 28 29 0d 0d 09 | 43 6f 6e 76 65 72 74 73 |ext()...|Converts|
|00000b30| 20 74 68 65 20 6e 75 6d | 62 65 72 73 20 72 65 74 | the num|bers ret|
|00000b40| 75 72 6e 65 64 20 69 6e | 20 53 65 63 73 32 44 61 |urned in| Secs2Da|
|00000b50| 74 65 20 74 6f 20 6d 6f | 72 65 20 72 65 61 64 61 |te to mo|re reada|
|00000b60| 62 6c 65 20 6d 6f 6e 74 | 68 73 2c 20 64 61 79 73 |ble mont|hs, days|
|00000b70| 2c 20 74 69 6d 65 2c 20 | 61 6e 64 0d 64 61 79 73 |, time, |and.days|
|00000b80| 20 6f 66 20 74 68 65 20 | 77 65 65 6b 2e 0d 2a 2f | of the |week..*/|
|00000b90| 0d 0d 76 6f 69 64 0d 64 | 61 74 65 5f 74 6f 5f 74 |..void.d|ate_to_t|
|00000ba0| 65 78 74 28 53 74 72 69 | 6e 67 48 61 6e 64 6c 65 |ext(Stri|ngHandle|
|00000bb0| 20 2a 6d 6f 6e 74 68 2c | 20 53 74 72 69 6e 67 48 | *month,| StringH|
|00000bc0| 61 6e 64 6c 65 20 2a 64 | 61 79 2c 20 53 74 72 69 |andle *d|ay, Stri|
|00000bd0| 6e 67 48 61 6e 64 6c 65 | 20 2a 77 65 65 6b 64 61 |ngHandle| *weekda|
|00000be0| 79 2c 20 0d 09 09 09 20 | 53 74 72 69 6e 67 48 61 |y, .... |StringHa|
|00000bf0| 6e 64 6c 65 20 2a 74 69 | 6d 65 2c 20 53 74 72 69 |ndle *ti|me, Stri|
|00000c00| 6e 67 48 61 6e 64 6c 65 | 20 2a 67 72 65 65 74 69 |ngHandle| *greeti|
|00000c10| 6e 67 29 0d 7b 0d 09 6c | 6f 6e 67 20 73 65 63 73 |ng).{..l|ong secs|
|00000c20| 2c 0d 09 09 20 6d 69 6c | 5f 74 69 6d 65 3b 0d 09 |,... mil|_time;..|
|00000c30| 53 74 72 32 35 35 20 68 | 6d 69 6e 3b 0d 09 44 61 |Str255 h|min;..Da|
|00000c40| 74 65 54 69 6d 65 52 65 | 63 20 6e 6f 77 3b 0d 09 |teTimeRe|c now;..|
|00000c50| 09 20 0d 09 47 65 74 44 | 61 74 65 54 69 6d 65 28 |. ..GetD|ateTime(|
|00000c60| 26 73 65 63 73 29 3b 0d | 09 49 55 54 69 6d 65 53 |&secs);.|.IUTimeS|
|00000c70| 74 72 69 6e 67 28 73 65 | 63 73 2c 20 66 61 6c 73 |tring(se|cs, fals|
|00000c80| 65 2c 20 68 6d 69 6e 29 | 3b 09 2f 2a 20 34 3a 32 |e, hmin)|;./* 4:2|
|00000c90| 32 20 41 4d 20 2a 2f 0d | 09 2a 28 68 6d 69 6e 2b |2 AM */.|.*(hmin+|
|00000ca0| 2a 68 6d 69 6e 2b 31 29 | 20 3d 20 27 25 27 3b 09 |*hmin+1)| = '%';.|
|00000cb0| 09 09 09 2f 2a 20 53 74 | 69 63 6b 20 69 6e 20 61 |.../* St|ick in a|
|00000cc0| 20 25 20 66 6f 72 20 4d | 75 6e 67 65 72 20 74 6f | % for M|unger to|
|00000cd0| 20 66 69 6e 64 20 6c 61 | 74 65 72 20 2a 2f 0d 09 | find la|ter */..|
|00000ce0| 2a 68 6d 69 6e 20 2b 3d | 20 31 3b 09 09 09 09 09 |*hmin +=| 1;.....|
|00000cf0| 09 09 2f 2a 20 61 6e 64 | 20 66 69 78 20 74 68 65 |../* and| fix the|
|00000d00| 20 6c 65 6e 67 74 68 20 | 62 79 74 65 2e 2e 2e 20 | length |byte... |
|00000d10| 2a 2f 0d 09 2a 74 69 6d | 65 20 3d 20 4e 65 77 53 |*/..*tim|e = NewS|
|00000d20| 74 72 69 6e 67 28 68 6d | 69 6e 29 3b 0d 09 6d 69 |tring(hm|in);..mi|
|00000d30| 6c 5f 74 69 6d 65 20 3d | 20 4d 75 6e 67 65 72 28 |l_time =| Munger(|
|00000d40| 2a 74 69 6d 65 2c 20 35 | 2c 20 22 4d 22 2c 20 31 |*time, 5|, "M", 1|
|00000d50| 2c 20 22 2e 4d 2e 22 2c | 20 33 29 3b 09 2f 2a 20 |, ".M.",| 3);./* |
|00000d60| 49 66 20 74 68 69 73 20 | 69 73 20 31 32 20 68 6f |If this |is 12 ho|
|00000d70| 75 72 20 74 69 6d 65 2c | 20 63 68 61 6e 67 65 20 |ur time,| change |
|00000d80| 2a 2f 0d 09 69 66 20 28 | 6d 69 6c 5f 74 69 6d 65 |*/..if (|mil_time|
|00000d90| 20 3e 3d 20 30 29 09 09 | 09 09 09 09 09 09 2f 2a | >= 0)..|....../*|
|00000da0| 20 41 4d 2f 50 4d 20 74 | 6f 20 41 2e 4d 2e 2f 50 | AM/PM t|o A.M./P|
|00000db0| 2e 4d 2e 20 2a 2f 0d 09 | 09 2a 2a 2a 74 69 6d 65 |.M. */..|.***time|
|00000dc0| 20 2b 3d 20 32 3b 09 09 | 09 09 09 2f 2a 20 4c 65 | += 2;..|.../* Le|
|00000dd0| 6e 67 74 68 20 62 79 74 | 65 20 61 67 61 69 6e 2e |ngth byt|e again.|
|00000de0| 2e 2e 20 2a 2f 0d 09 0d | 09 53 65 63 73 32 44 61 |.. */...|.Secs2Da|
|00000df0| 74 65 28 73 65 63 73 2c | 20 26 6e 6f 77 29 3b 09 |te(secs,| &now);.|
|00000e00| 09 09 09 2f 2a 20 54 75 | 72 6e 20 74 68 65 20 73 |.../* Tu|rn the s|
|00000e10| 65 63 6f 6e 64 73 20 73 | 69 6e 63 65 20 31 39 30 |econds s|ince 190|
|00000e20| 34 20 69 6e 74 6f 20 61 | 20 64 61 74 65 2f 74 69 |4 into a| date/ti|
|00000e30| 6d 65 20 72 65 63 6f 72 | 64 20 2a 2f 0d 09 73 77 |me recor|d */..sw|
|00000e40| 69 74 63 68 20 28 6e 6f | 77 2e 64 61 79 4f 66 57 |itch (no|w.dayOfW|
|00000e50| 65 65 6b 29 20 7b 09 09 | 09 2f 2a 20 43 68 61 6e |eek) {..|./* Chan|
|00000e60| 67 65 20 74 68 65 20 64 | 61 79 20 6f 66 20 77 65 |ge the d|ay of we|
|00000e70| 65 6b 2c 20 6d 6f 6e 74 | 68 2c 20 61 6e 64 20 64 |ek, mont|h, and d|
|00000e80| 61 74 65 20 69 6e 74 6f | 20 77 6f 72 64 73 20 2a |ate into| words *|
|00000e90| 2f 0d 09 09 63 61 73 65 | 20 31 3a 0d 09 09 09 2a |/...case| 1:....*|
|00000ea0| 77 65 65 6b 64 61 79 20 | 3d 20 4e 65 77 53 74 72 |weekday |= NewStr|
|00000eb0| 69 6e 67 28 22 5c 70 53 | 75 6e 64 61 79 2c 20 25 |ing("\pS|unday, %|
|00000ec0| 22 29 3b 09 2f 2a 20 61 | 6e 64 20 73 74 69 63 6b |");./* a|nd stick|
|00000ed0| 20 69 6e 20 61 20 25 20 | 66 6f 72 20 4d 75 6e 67 | in a % |for Mung|
|00000ee0| 65 72 20 74 6f 20 66 69 | 6e 64 20 6c 61 74 65 72 |er to fi|nd later|
|00000ef0| 2e 2e 2e 20 2a 2f 0d 09 | 09 09 62 72 65 61 6b 3b |... */..|..break;|
|00000f00| 0d 09 09 63 61 73 65 20 | 32 3a 0d 09 09 09 2a 77 |...case |2:....*w|
|00000f10| 65 65 6b 64 61 79 20 3d | 20 4e 65 77 53 74 72 69 |eekday =| NewStri|
|00000f20| 6e 67 28 22 5c 70 4d 6f | 6e 64 61 79 2c 20 25 22 |ng("\pMo|nday, %"|
|00000f30| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00000f40| 61 73 65 20 33 3a 0d 09 | 09 09 2a 77 65 65 6b 64 |ase 3:..|..*weekd|
|00000f50| 61 79 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |ay = New|String("|
|00000f60| 5c 70 54 75 65 73 64 61 | 79 2c 20 25 22 29 3b 0d |\pTuesda|y, %");.|
|00000f70| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00000f80| 20 34 3a 0d 09 09 09 2a | 77 65 65 6b 64 61 79 20 | 4:....*|weekday |
|00000f90| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 57 |= NewStr|ing("\pW|
|00000fa0| 65 64 6e 65 73 64 61 79 | 2c 20 25 22 29 3b 0d 09 |ednesday|, %");..|
|00000fb0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|00000fc0| 35 3a 0d 09 09 09 2a 77 | 65 65 6b 64 61 79 20 3d |5:....*w|eekday =|
|00000fd0| 20 4e 65 77 53 74 72 69 | 6e 67 28 22 5c 70 54 68 | NewStri|ng("\pTh|
|00000fe0| 75 72 73 64 61 79 2c 20 | 25 22 29 3b 0d 09 09 09 |ursday, |%");....|
|00000ff0| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 36 3a |break;..|.case 6:|
|00001000| 0d 09 09 09 2a 77 65 65 | 6b 64 61 79 20 3d 20 4e |....*wee|kday = N|
|00001010| 65 77 53 74 72 69 6e 67 | 28 22 5c 70 46 72 69 64 |ewString|("\pFrid|
|00001020| 61 79 2c 20 25 22 29 3b | 0d 09 09 09 62 72 65 61 |ay, %");|....brea|
|00001030| 6b 3b 0d 09 09 63 61 73 | 65 20 37 3a 0d 09 09 09 |k;...cas|e 7:....|
|00001040| 2a 77 65 65 6b 64 61 79 | 20 3d 20 4e 65 77 53 74 |*weekday| = NewSt|
|00001050| 72 69 6e 67 28 22 5c 70 | 53 61 74 75 72 64 61 79 |ring("\p|Saturday|
|00001060| 2c 20 25 22 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |, %");..|..break;|
|00001070| 0d 09 7d 0d 09 73 77 69 | 74 63 68 20 28 6e 6f 77 |..}..swi|tch (now|
|00001080| 2e 6d 6f 6e 74 68 29 20 | 7b 0d 09 09 63 61 73 65 |.month) |{...case|
|00001090| 20 31 3a 0d 09 09 09 2a | 6d 6f 6e 74 68 20 3d 20 | 1:....*|month = |
|000010a0| 4e 65 77 53 74 72 69 6e | 67 28 22 5c 70 4a 61 6e |NewStrin|g("\pJan|
|000010b0| 75 61 72 79 20 25 22 29 | 3b 0d 09 09 09 62 72 65 |uary %")|;....bre|
|000010c0| 61 6b 3b 0d 09 09 63 61 | 73 65 20 32 3a 0d 09 09 |ak;...ca|se 2:...|
|000010d0| 09 2a 6d 6f 6e 74 68 20 | 3d 20 4e 65 77 53 74 72 |.*month |= NewStr|
|000010e0| 69 6e 67 28 22 5c 70 46 | 65 62 72 75 61 72 79 20 |ing("\pF|ebruary |
|000010f0| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|00001100| 09 63 61 73 65 20 33 3a | 0d 09 09 09 2a 6d 6f 6e |.case 3:|....*mon|
|00001110| 74 68 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |th = New|String("|
|00001120| 5c 70 4d 61 72 63 68 20 | 25 22 29 3b 0d 09 09 09 |\pMarch |%");....|
|00001130| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 34 3a |break;..|.case 4:|
|00001140| 0d 09 09 09 2a 6d 6f 6e | 74 68 20 3d 20 4e 65 77 |....*mon|th = New|
|00001150| 53 74 72 69 6e 67 28 22 | 5c 70 41 70 72 69 6c 20 |String("|\pApril |
|00001160| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|00001170| 09 63 61 73 65 20 35 3a | 0d 09 09 09 2a 6d 6f 6e |.case 5:|....*mon|
|00001180| 74 68 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |th = New|String("|
|00001190| 5c 70 4d 61 79 20 25 22 | 29 3b 0d 09 09 09 62 72 |\pMay %"|);....br|
|000011a0| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 36 3a 0d 09 |eak;...c|ase 6:..|
|000011b0| 09 09 2a 6d 6f 6e 74 68 | 20 3d 20 4e 65 77 53 74 |..*month| = NewSt|
|000011c0| 72 69 6e 67 28 22 5c 70 | 4a 75 6e 65 20 25 22 29 |ring("\p|June %")|
|000011d0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|000011e0| 73 65 20 37 3a 0d 09 09 | 09 2a 6d 6f 6e 74 68 20 |se 7:...|.*month |
|000011f0| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 4a |= NewStr|ing("\pJ|
|00001200| 75 6c 79 20 25 22 29 3b | 0d 09 09 09 62 72 65 61 |uly %");|....brea|
|00001210| 6b 3b 0d 09 09 63 61 73 | 65 20 38 3a 0d 09 09 09 |k;...cas|e 8:....|
|00001220| 2a 6d 6f 6e 74 68 20 3d | 20 4e 65 77 53 74 72 69 |*month =| NewStri|
|00001230| 6e 67 28 22 5c 70 41 75 | 67 75 73 74 20 25 22 29 |ng("\pAu|gust %")|
|00001240| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00001250| 73 65 20 39 3a 0d 09 09 | 09 2a 6d 6f 6e 74 68 20 |se 9:...|.*month |
|00001260| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 53 |= NewStr|ing("\pS|
|00001270| 65 70 74 65 6d 62 65 72 | 20 25 22 29 3b 0d 09 09 |eptember| %");...|
|00001280| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 31 |.break;.|..case 1|
|00001290| 30 3a 0d 09 09 09 2a 6d | 6f 6e 74 68 20 3d 20 4e |0:....*m|onth = N|
|000012a0| 65 77 53 74 72 69 6e 67 | 28 22 5c 70 4f 63 74 6f |ewString|("\pOcto|
|000012b0| 62 65 72 20 25 22 29 3b | 0d 09 09 09 62 72 65 61 |ber %");|....brea|
|000012c0| 6b 3b 0d 09 09 63 61 73 | 65 20 31 31 3a 0d 09 09 |k;...cas|e 11:...|
|000012d0| 09 2a 6d 6f 6e 74 68 20 | 3d 20 4e 65 77 53 74 72 |.*month |= NewStr|
|000012e0| 69 6e 67 28 22 5c 70 4e | 6f 76 65 6d 62 65 72 20 |ing("\pN|ovember |
|000012f0| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|00001300| 09 63 61 73 65 20 31 32 | 3a 0d 09 09 09 2a 6d 6f |.case 12|:....*mo|
|00001310| 6e 74 68 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |nth = Ne|wString(|
|00001320| 22 5c 70 44 65 63 65 6d | 62 65 72 20 25 22 29 3b |"\pDecem|ber %");|
|00001330| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 7d 0d 09 73 |....brea|k;..}..s|
|00001340| 77 69 74 63 68 20 28 6e | 6f 77 2e 64 61 79 29 20 |witch (n|ow.day) |
|00001350| 7b 0d 09 09 63 61 73 65 | 20 31 3a 0d 09 09 09 2a |{...case| 1:....*|
|00001360| 64 61 79 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |day = Ne|wString(|
|00001370| 22 5c 70 66 69 72 73 74 | 20 25 22 29 3b 0d 09 09 |"\pfirst| %");...|
|00001380| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 32 |.break;.|..case 2|
|00001390| 3a 0d 09 09 09 2a 64 61 | 79 20 3d 20 4e 65 77 53 |:....*da|y = NewS|
|000013a0| 74 72 69 6e 67 28 22 5c | 70 73 65 63 6f 6e 64 20 |tring("\|psecond |
|000013b0| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|000013c0| 09 63 61 73 65 20 33 3a | 0d 09 09 09 2a 64 61 79 |.case 3:|....*day|
|000013d0| 20 3d 20 4e 65 77 53 74 | 72 69 6e 67 28 22 5c 70 | = NewSt|ring("\p|
|000013e0| 74 68 69 72 64 20 25 22 | 29 3b 0d 09 09 09 62 72 |third %"|);....br|
|000013f0| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 34 3a 0d 09 |eak;...c|ase 4:..|
|00001400| 09 09 2a 64 61 79 20 3d | 20 4e 65 77 53 74 72 69 |..*day =| NewStri|
|00001410| 6e 67 28 22 5c 70 66 6f | 75 72 74 68 20 25 22 29 |ng("\pfo|urth %")|
|00001420| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00001430| 73 65 20 35 3a 0d 09 09 | 09 2a 64 61 79 20 3d 20 |se 5:...|.*day = |
|00001440| 4e 65 77 53 74 72 69 6e | 67 28 22 5c 70 66 69 66 |NewStrin|g("\pfif|
|00001450| 74 68 20 25 22 29 3b 0d | 09 09 09 62 72 65 61 6b |th %");.|...break|
|00001460| 3b 0d 09 09 63 61 73 65 | 20 36 3a 0d 09 09 09 2a |;...case| 6:....*|
|00001470| 64 61 79 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |day = Ne|wString(|
|00001480| 22 5c 70 73 69 78 74 68 | 20 25 22 29 3b 0d 09 09 |"\psixth| %");...|
|00001490| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 37 |.break;.|..case 7|
|000014a0| 3a 0d 09 09 09 2a 64 61 | 79 20 3d 20 4e 65 77 53 |:....*da|y = NewS|
|000014b0| 74 72 69 6e 67 28 22 5c | 70 73 65 76 65 6e 74 68 |tring("\|pseventh|
|000014c0| 20 25 22 29 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d | %");...|.break;.|
|000014d0| 09 09 63 61 73 65 20 38 | 3a 0d 09 09 09 2a 64 61 |..case 8|:....*da|
|000014e0| 79 20 3d 20 4e 65 77 53 | 74 72 69 6e 67 28 22 5c |y = NewS|tring("\|
|000014f0| 70 65 69 67 68 74 68 20 | 25 22 29 3b 0d 09 09 09 |peighth |%");....|
|00001500| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 39 3a |break;..|.case 9:|
|00001510| 0d 09 09 09 2a 64 61 79 | 20 3d 20 4e 65 77 53 74 |....*day| = NewSt|
|00001520| 72 69 6e 67 28 22 5c 70 | 6e 69 6e 65 74 68 20 25 |ring("\p|nineth %|
|00001530| 22 29 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |");....b|reak;...|
|00001540| 63 61 73 65 20 31 30 3a | 0d 09 09 09 2a 64 61 79 |case 10:|....*day|
|00001550| 20 3d 20 4e 65 77 53 74 | 72 69 6e 67 28 22 5c 70 | = NewSt|ring("\p|
|00001560| 74 65 6e 74 68 20 25 22 | 29 3b 0d 09 09 09 62 72 |tenth %"|);....br|
|00001570| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 31 31 3a 0d |eak;...c|ase 11:.|
|00001580| 09 09 09 2a 64 61 79 20 | 3d 20 4e 65 77 53 74 72 |...*day |= NewStr|
|00001590| 69 6e 67 28 22 5c 70 65 | 6c 65 76 65 6e 74 68 20 |ing("\pe|leventh |
|000015a0| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|000015b0| 09 63 61 73 65 20 31 32 | 3a 0d 09 09 09 2a 64 61 |.case 12|:....*da|
|000015c0| 79 20 3d 20 4e 65 77 53 | 74 72 69 6e 67 28 22 5c |y = NewS|tring("\|
|000015d0| 70 74 77 65 6c 76 65 74 | 68 20 25 22 29 3b 0d 09 |ptwelvet|h %");..|
|000015e0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|000015f0| 31 33 3a 0d 09 09 09 2a | 64 61 79 20 3d 20 4e 65 |13:....*|day = Ne|
|00001600| 77 53 74 72 69 6e 67 28 | 22 5c 70 74 68 69 72 74 |wString(|"\pthirt|
|00001610| 65 65 6e 74 68 20 25 22 | 29 3b 0d 09 09 09 62 72 |eenth %"|);....br|
|00001620| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 31 34 3a 0d |eak;...c|ase 14:.|
|00001630| 09 09 09 2a 64 61 79 20 | 3d 20 4e 65 77 53 74 72 |...*day |= NewStr|
|00001640| 69 6e 67 28 22 5c 70 66 | 6f 75 72 74 65 65 6e 74 |ing("\pf|ourteent|
|00001650| 68 20 25 22 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |h %");..|..break;|
|00001660| 0d 09 09 63 61 73 65 20 | 31 35 3a 0d 09 09 09 2a |...case |15:....*|
|00001670| 64 61 79 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |day = Ne|wString(|
|00001680| 22 5c 70 66 69 66 74 65 | 65 6e 74 68 20 25 22 29 |"\pfifte|enth %")|
|00001690| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|000016a0| 73 65 20 31 36 3a 0d 09 | 09 09 2a 64 61 79 20 3d |se 16:..|..*day =|
|000016b0| 20 4e 65 77 53 74 72 69 | 6e 67 28 22 5c 70 73 69 | NewStri|ng("\psi|
|000016c0| 78 74 65 65 6e 74 68 20 | 25 22 29 3b 0d 09 09 09 |xteenth |%");....|
|000016d0| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 31 37 |break;..|.case 17|
|000016e0| 3a 0d 09 09 09 2a 64 61 | 79 20 3d 20 4e 65 77 53 |:....*da|y = NewS|
|000016f0| 74 72 69 6e 67 28 22 5c | 70 73 65 76 65 6e 74 65 |tring("\|psevente|
|00001700| 65 6e 74 68 20 25 22 29 | 3b 0d 09 09 09 62 72 65 |enth %")|;....bre|
|00001710| 61 6b 3b 0d 09 09 63 61 | 73 65 20 31 38 3a 0d 09 |ak;...ca|se 18:..|
|00001720| 09 09 2a 64 61 79 20 3d | 20 4e 65 77 53 74 72 69 |..*day =| NewStri|
|00001730| 6e 67 28 22 5c 70 65 69 | 67 68 74 65 65 6e 74 68 |ng("\pei|ghteenth|
|00001740| 20 25 22 29 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d | %");...|.break;.|
|00001750| 09 09 63 61 73 65 20 31 | 39 3a 0d 09 09 09 2a 64 |..case 1|9:....*d|
|00001760| 61 79 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |ay = New|String("|
|00001770| 5c 70 6e 69 6e 65 74 65 | 65 6e 74 68 20 25 22 29 |\pninete|enth %")|
|00001780| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00001790| 73 65 20 32 30 3a 0d 09 | 09 09 2a 64 61 79 20 3d |se 20:..|..*day =|
|000017a0| 20 4e 65 77 53 74 72 69 | 6e 67 28 22 5c 70 74 77 | NewStri|ng("\ptw|
|000017b0| 65 6e 74 69 65 74 68 20 | 25 22 29 3b 0d 09 09 09 |entieth |%");....|
|000017c0| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 32 31 |break;..|.case 21|
|000017d0| 3a 0d 09 09 09 2a 64 61 | 79 20 3d 20 4e 65 77 53 |:....*da|y = NewS|
|000017e0| 74 72 69 6e 67 28 22 5c | 70 74 77 65 6e 74 79 2d |tring("\|ptwenty-|
|000017f0| 66 69 72 73 74 20 25 22 | 29 3b 0d 09 09 09 62 72 |first %"|);....br|
|00001800| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 32 32 3a 0d |eak;...c|ase 22:.|
|00001810| 09 09 09 2a 64 61 79 20 | 3d 20 4e 65 77 53 74 72 |...*day |= NewStr|
|00001820| 69 6e 67 28 22 5c 70 74 | 77 65 6e 74 79 2d 73 65 |ing("\pt|wenty-se|
|00001830| 63 6f 6e 64 20 25 22 29 | 3b 0d 09 09 09 62 72 65 |cond %")|;....bre|
|00001840| 61 6b 3b 0d 09 09 63 61 | 73 65 20 32 33 3a 0d 09 |ak;...ca|se 23:..|
|00001850| 09 09 2a 64 61 79 20 3d | 20 4e 65 77 53 74 72 69 |..*day =| NewStri|
|00001860| 6e 67 28 22 5c 70 74 77 | 65 6e 74 79 2d 74 68 69 |ng("\ptw|enty-thi|
|00001870| 72 64 20 25 22 29 3b 0d | 09 09 09 62 72 65 61 6b |rd %");.|...break|
|00001880| 3b 0d 09 09 63 61 73 65 | 20 32 34 3a 0d 09 09 09 |;...case| 24:....|
|00001890| 2a 64 61 79 20 3d 20 4e | 65 77 53 74 72 69 6e 67 |*day = N|ewString|
|000018a0| 28 22 5c 70 74 77 65 6e | 74 79 2d 66 6f 75 72 74 |("\ptwen|ty-fourt|
|000018b0| 68 20 25 22 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |h %");..|..break;|
|000018c0| 0d 09 09 63 61 73 65 20 | 32 35 3a 0d 09 09 09 2a |...case |25:....*|
|000018d0| 64 61 79 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |day = Ne|wString(|
|000018e0| 22 5c 70 74 77 65 6e 74 | 79 2d 66 69 66 74 68 20 |"\ptwent|y-fifth |
|000018f0| 25 22 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |%");....|break;..|
|00001900| 09 63 61 73 65 20 32 36 | 3a 0d 09 09 09 2a 64 61 |.case 26|:....*da|
|00001910| 79 20 3d 20 4e 65 77 53 | 74 72 69 6e 67 28 22 5c |y = NewS|tring("\|
|00001920| 70 74 77 65 6e 74 79 2d | 73 69 78 74 68 20 25 22 |ptwenty-|sixth %"|
|00001930| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00001940| 61 73 65 20 32 37 3a 0d | 09 09 09 2a 64 61 79 20 |ase 27:.|...*day |
|00001950| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 74 |= NewStr|ing("\pt|
|00001960| 77 65 6e 74 79 2d 73 65 | 76 65 6e 74 68 20 25 22 |wenty-se|venth %"|
|00001970| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00001980| 61 73 65 20 32 38 3a 0d | 09 09 09 2a 64 61 79 20 |ase 28:.|...*day |
|00001990| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 74 |= NewStr|ing("\pt|
|000019a0| 77 65 6e 74 79 2d 65 69 | 67 68 74 68 20 25 22 29 |wenty-ei|ghth %")|
|000019b0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|000019c0| 73 65 20 32 39 3a 0d 09 | 09 09 2a 64 61 79 20 3d |se 29:..|..*day =|
|000019d0| 20 4e 65 77 53 74 72 69 | 6e 67 28 22 5c 70 74 77 | NewStri|ng("\ptw|
|000019e0| 65 6e 74 79 2d 6e 69 6e | 74 68 20 25 22 29 3b 0d |enty-nin|th %");.|
|000019f0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00001a00| 20 33 30 3a 0d 09 09 09 | 2a 64 61 79 20 3d 20 4e | 30:....|*day = N|
|00001a10| 65 77 53 74 72 69 6e 67 | 28 22 5c 70 74 68 69 72 |ewString|("\pthir|
|00001a20| 74 69 65 74 68 20 25 22 | 29 3b 0d 09 09 09 62 72 |tieth %"|);....br|
|00001a30| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 33 31 3a 0d |eak;...c|ase 31:.|
|00001a40| 09 09 09 2a 64 61 79 20 | 3d 20 4e 65 77 53 74 72 |...*day |= NewStr|
|00001a50| 69 6e 67 28 22 5c 70 74 | 68 69 72 74 79 2d 66 69 |ing("\pt|hirty-fi|
|00001a60| 72 73 74 20 25 22 29 3b | 0d 09 09 09 62 72 65 61 |rst %");|....brea|
|00001a70| 6b 3b 0d 09 7d 0d 09 0d | 09 2f 2a 20 47 6f 20 74 |k;..}...|./* Go t|
|00001a80| 68 6f 75 67 68 20 61 6e | 64 20 6c 6f 6f 6b 20 66 |hough an|d look f|
|00001a90| 6f 72 20 68 6f 6c 69 64 | 61 79 73 20 2d 2d 20 73 |or holid|ays -- s|
|00001aa0| 70 65 63 69 66 69 63 20 | 64 61 74 65 20 2a 2f 0d |pecific |date */.|
|00001ab0| 09 69 66 20 28 28 6e 6f | 77 2e 6d 6f 6e 74 68 20 |.if ((no|w.month |
|00001ac0| 3d 3d 20 31 29 20 26 20 | 28 6e 6f 77 2e 64 61 79 |== 1) & |(now.day|
|00001ad0| 20 3d 3d 20 31 29 29 0d | 09 09 2a 67 72 65 65 74 | == 1)).|..*greet|
|00001ae0| 69 6e 67 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |ing = Ne|wString(|
|00001af0| 22 5c 70 48 61 70 70 79 | 20 4e 65 77 20 59 65 61 |"\pHappy| New Yea|
|00001b00| 72 21 20 25 22 29 3b 0d | 09 65 6c 73 65 20 69 66 |r! %");.|.else if|
|00001b10| 20 28 28 6e 6f 77 2e 6d | 6f 6e 74 68 20 3d 3d 20 | ((now.m|onth == |
|00001b20| 32 29 20 26 20 28 6e 6f | 77 2e 64 61 79 20 3d 3d |2) & (no|w.day ==|
|00001b30| 20 31 34 29 29 0d 09 09 | 2a 67 72 65 65 74 69 6e | 14))...|*greetin|
|00001b40| 67 20 3d 20 4e 65 77 53 | 74 72 69 6e 67 28 22 5c |g = NewS|tring("\|
|00001b50| 70 48 61 70 70 79 20 56 | 61 6c 65 6e 74 69 6e 65 |pHappy V|alentine|
|00001b60| 27 73 20 44 61 79 21 20 | 25 22 29 3b 0d 09 65 6c |'s Day! |%");..el|
|00001b70| 73 65 20 69 66 20 28 28 | 6e 6f 77 2e 6d 6f 6e 74 |se if ((|now.mont|
|00001b80| 68 20 3d 3d 20 33 29 20 | 26 20 28 6e 6f 77 2e 64 |h == 3) |& (now.d|
|00001b90| 61 79 20 3d 3d 20 31 37 | 29 29 0d 09 09 2a 67 72 |ay == 17|))...*gr|
|00001ba0| 65 65 74 69 6e 67 20 3d | 20 4e 65 77 53 74 72 69 |eeting =| NewStri|
|00001bb0| 6e 67 28 22 5c 70 48 61 | 70 70 79 20 53 61 69 6e |ng("\pHa|ppy Sain|
|00001bc0| 74 20 50 61 74 72 69 63 | 6b 27 73 20 44 61 79 21 |t Patric|k's Day!|
|00001bd0| 20 25 22 29 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 | %");..e|lse if (|
|00001be0| 28 6e 6f 77 2e 6d 6f 6e | 74 68 20 3d 3d 20 33 29 |(now.mon|th == 3)|
|00001bf0| 20 26 20 28 6e 6f 77 2e | 64 61 79 20 3d 3d 20 31 | & (now.|day == 1|
|00001c00| 39 29 29 0d 09 09 2a 67 | 72 65 65 74 69 6e 67 20 |9))...*g|reeting |
|00001c10| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 48 |= NewStr|ing("\pH|
|00001c20| 61 70 70 79 20 53 61 69 | 6e 74 20 4a 6f 73 65 70 |appy Sai|nt Josep|
|00001c30| 68 27 73 20 44 61 79 21 | 20 25 22 29 3b 09 2f 2a |h's Day!| %");./*|
|00001c40| 20 49 20 77 61 6e 74 20 | 61 20 7a 65 70 70 6f 6c | I want |a zeppol|
|00001c50| 61 21 20 2a 2f 0d 09 65 | 6c 73 65 20 69 66 20 28 |a! */..e|lse if (|
|00001c60| 28 6e 6f 77 2e 6d 6f 6e | 74 68 20 3d 3d 20 36 29 |(now.mon|th == 6)|
|00001c70| 20 26 20 28 6e 6f 77 2e | 64 61 79 20 3d 3d 20 31 | & (now.|day == 1|
|00001c80| 34 29 29 0d 09 09 2a 67 | 72 65 65 74 69 6e 67 20 |4))...*g|reeting |
|00001c90| 3d 20 4e 65 77 53 74 72 | 69 6e 67 28 22 5c 70 48 |= NewStr|ing("\pH|
|00001ca0| 61 70 70 79 20 46 6c 61 | 67 20 44 61 79 21 20 25 |appy Fla|g Day! %|
|00001cb0| 22 29 3b 0d 09 65 6c 73 | 65 20 69 66 20 28 28 6e |");..els|e if ((n|
|00001cc0| 6f 77 2e 6d 6f 6e 74 68 | 20 3d 3d 20 37 29 20 26 |ow.month| == 7) &|
|00001cd0| 20 28 6e 6f 77 2e 64 61 | 79 20 3d 3d 20 34 29 29 | (now.da|y == 4))|
|00001ce0| 0d 09 09 2a 67 72 65 65 | 74 69 6e 67 20 3d 20 4e |...*gree|ting = N|
|00001cf0| 65 77 53 74 72 69 6e 67 | 28 22 5c 70 48 61 70 70 |ewString|("\pHapp|
|00001d00| 79 20 49 6e 64 65 70 65 | 6e 64 65 6e 63 65 20 44 |y Indepe|ndence D|
|00001d10| 61 79 21 20 25 22 29 3b | 0d 09 65 6c 73 65 20 69 |ay! %");|..else i|
|00001d20| 66 20 28 28 6e 6f 77 2e | 6d 6f 6e 74 68 20 3d 3d |f ((now.|month ==|
|00001d30| 20 31 30 29 20 26 20 28 | 6e 6f 77 2e 64 61 79 20 | 10) & (|now.day |
|00001d40| 3d 3d 20 31 32 29 29 0d | 09 09 2a 67 72 65 65 74 |== 12)).|..*greet|
|00001d50| 69 6e 67 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |ing = Ne|wString(|
|00001d60| 22 5c 70 48 61 70 70 79 | 20 43 6f 6c 75 6d 62 75 |"\pHappy| Columbu|
|00001d70| 73 20 44 61 79 21 20 25 | 22 29 3b 0d 09 65 6c 73 |s Day! %|");..els|
|00001d80| 65 20 69 66 20 28 28 6e | 6f 77 2e 6d 6f 6e 74 68 |e if ((n|ow.month|
|00001d90| 20 3d 3d 20 31 30 29 20 | 26 20 28 6e 6f 77 2e 64 | == 10) |& (now.d|
|00001da0| 61 79 20 3d 3d 20 33 31 | 29 29 0d 09 09 2a 67 72 |ay == 31|))...*gr|
|00001db0| 65 65 74 69 6e 67 20 3d | 20 4e 65 77 53 74 72 69 |eeting =| NewStri|
|00001dc0| 6e 67 28 22 5c 70 48 61 | 70 70 79 20 48 61 6c 6c |ng("\pHa|ppy Hall|
|00001dd0| 6f 77 65 65 6e 21 20 25 | 22 29 3b 0d 09 65 6c 73 |oween! %|");..els|
|00001de0| 65 20 69 66 20 28 28 6e | 6f 77 2e 6d 6f 6e 74 68 |e if ((n|ow.month|
|00001df0| 20 3d 3d 20 31 31 29 20 | 26 20 28 6e 6f 77 2e 64 | == 11) |& (now.d|
|00001e00| 61 79 20 3d 3d 20 31 31 | 29 29 0d 09 09 2a 67 72 |ay == 11|))...*gr|
|00001e10| 65 65 74 69 6e 67 20 3d | 20 4e 65 77 53 74 72 69 |eeting =| NewStri|
|00001e20| 6e 67 28 22 5c 70 48 61 | 70 70 79 20 56 65 74 65 |ng("\pHa|ppy Vete|
|00001e30| 72 61 6e 73 20 44 61 79 | 21 20 25 22 29 3b 0d 09 |rans Day|! %");..|
|00001e40| 65 6c 73 65 20 69 66 20 | 28 28 6e 6f 77 2e 6d 6f |else if |((now.mo|
|00001e50| 6e 74 68 20 3d 3d 20 31 | 32 29 20 26 20 28 6e 6f |nth == 1|2) & (no|
|00001e60| 77 2e 64 61 79 20 3d 3d | 20 32 35 29 29 0d 09 09 |w.day ==| 25))...|
|00001e70| 2a 67 72 65 65 74 69 6e | 67 20 3d 20 4e 65 77 53 |*greetin|g = NewS|
|00001e80| 74 72 69 6e 67 28 22 5c | 70 4d 65 72 72 79 20 43 |tring("\|pMerry C|
|00001e90| 68 72 69 73 6d 61 73 21 | 20 25 22 29 3b 0d 09 0d |hrismas!| %");...|
|00001ea0| 09 2f 2a 20 4e 6f 77 20 | 66 69 6e 64 20 32 6e 64 |./* Now |find 2nd|
|00001eb0| 20 4d 6f 6e 64 61 79 2c | 20 34 74 68 20 54 68 75 | Monday,| 4th Thu|
|00001ec0| 72 73 64 61 79 2c 20 65 | 74 63 2e 20 2a 2f 0d 09 |rsday, e|tc. */..|
|00001ed0| 65 6c 73 65 20 69 66 20 | 28 28 6e 6f 77 2e 6d 6f |else if |((now.mo|
|00001ee0| 6e 74 68 20 3d 3d 20 32 | 29 20 26 20 28 6e 6f 77 |nth == 2|) & (now|
|00001ef0| 2e 64 61 79 20 3e 3d 20 | 39 29 20 26 20 28 6e 6f |.day >= |9) & (no|
|00001f00| 77 2e 64 61 79 20 3c 3d | 20 31 35 29 20 26 20 28 |w.day <=| 15) & (|
|00001f10| 6e 6f 77 2e 64 61 79 4f | 66 57 65 65 6b 20 3d 3d |now.dayO|fWeek ==|
|00001f20| 20 32 29 29 0d 09 09 2a | 67 72 65 65 74 69 6e 67 | 2))...*|greeting|
|00001f30| 20 3d 20 4e 65 77 53 74 | 72 69 6e 67 28 22 5c 70 | = NewSt|ring("\p|
|00001f40| 48 61 70 70 79 20 50 72 | 65 73 69 64 65 6e 74 73 |Happy Pr|esidents|
|00001f50| 27 20 44 61 79 21 20 25 | 22 29 3b 0d 09 65 6c 73 |' Day! %|");..els|
|00001f60| 65 20 69 66 20 28 28 6e | 6f 77 2e 6d 6f 6e 74 68 |e if ((n|ow.month|
|00001f70| 20 3d 3d 20 35 29 20 26 | 20 28 6e 6f 77 2e 64 61 | == 5) &| (now.da|
|00001f80| 79 20 3e 3d 20 38 29 20 | 26 20 28 6e 6f 77 2e 64 |y >= 8) |& (now.d|
|00001f90| 61 79 20 3c 3d 20 31 34 | 29 20 26 20 28 6e 6f 77 |ay <= 14|) & (now|
|00001fa0| 2e 64 61 79 4f 66 57 65 | 65 6b 20 3d 3d 20 31 29 |.dayOfWe|ek == 1)|
|00001fb0| 29 0d 09 09 2a 67 72 65 | 65 74 69 6e 67 20 3d 20 |)...*gre|eting = |
|00001fc0| 4e 65 77 53 74 72 69 6e | 67 28 22 5c 70 48 61 70 |NewStrin|g("\pHap|
|00001fd0| 70 79 20 4d 6f 74 68 65 | 72 27 73 20 44 61 79 21 |py Mothe|r's Day!|
|00001fe0| 20 25 22 29 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 | %");..e|lse if (|
|00001ff0| 28 6e 6f 77 2e 6d 6f 6e | 74 68 20 3d 3d 20 36 29 |(now.mon|th == 6)|
|00002000| 20 26 20 28 6e 6f 77 2e | 64 61 79 20 3e 3d 20 31 | & (now.|day >= 1|
|00002010| 35 29 20 26 20 28 6e 6f | 77 2e 64 61 79 20 3c 3d |5) & (no|w.day <=|
|00002020| 20 32 31 29 20 26 20 28 | 6e 6f 77 2e 64 61 79 4f | 21) & (|now.dayO|
|00002030| 66 57 65 65 6b 20 3d 3d | 31 29 29 0d 09 09 2a 67 |fWeek ==|1))...*g|
|00002040| 72 65 65 74 69 6e 67 20 | 3d 20 4e 65 77 53 74 72 |reeting |= NewStr|
|00002050| 69 6e 67 28 22 5c 70 48 | 61 70 70 79 20 46 61 74 |ing("\pH|appy Fat|
|00002060| 68 65 72 27 73 20 44 61 | 79 21 20 25 22 29 3b 0d |her's Da|y! %");.|
|00002070| 09 65 6c 73 65 20 69 66 | 20 28 28 6e 6f 77 2e 6d |.else if| ((now.m|
|00002080| 6f 6e 74 68 20 3d 3d 20 | 39 29 20 26 20 28 6e 6f |onth == |9) & (no|
|00002090| 77 2e 64 61 79 20 3e 3d | 20 31 29 20 26 20 28 6e |w.day >=| 1) & (n|
|000020a0| 6f 77 2e 64 61 79 20 3c | 3d 20 37 29 20 26 20 28 |ow.day <|= 7) & (|
|000020b0| 6e 6f 77 2e 64 61 79 4f | 66 57 65 65 6b 20 3d 3d |now.dayO|fWeek ==|
|000020c0| 20 32 29 29 0d 09 09 2a | 67 72 65 65 74 69 6e 67 | 2))...*|greeting|
|000020d0| 20 3d 20 4e 65 77 53 74 | 72 69 6e 67 28 22 5c 70 | = NewSt|ring("\p|
|000020e0| 48 61 70 70 79 20 4c 61 | 62 6f 72 20 44 61 79 21 |Happy La|bor Day!|
|000020f0| 20 25 22 29 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 | %");..e|lse if (|
|00002100| 28 6e 6f 77 2e 6d 6f 6e | 74 68 20 3d 3d 20 31 31 |(now.mon|th == 11|
|00002110| 29 20 26 20 28 6e 6f 77 | 2e 64 61 79 20 3e 3d 20 |) & (now|.day >= |
|00002120| 32 32 29 20 26 20 28 6e | 6f 77 2e 64 61 79 20 3c |22) & (n|ow.day <|
|00002130| 3d 20 32 38 29 20 26 20 | 28 6e 6f 77 2e 64 61 79 |= 28) & |(now.day|
|00002140| 4f 66 57 65 65 6b 20 3d | 3d 20 35 29 29 0d 09 09 |OfWeek =|= 5))...|
|00002150| 2a 67 72 65 65 74 69 6e | 67 20 3d 20 4e 65 77 53 |*greetin|g = NewS|
|00002160| 74 72 69 6e 67 28 22 5c | 70 48 61 70 70 79 20 54 |tring("\|pHappy T|
|00002170| 68 61 6e 6b 73 67 69 76 | 69 6e 67 21 20 25 22 29 |hanksgiv|ing! %")|
|00002180| 3b 0d 09 0d 09 2f 2a 20 | 45 76 65 6e 69 6e 67 20 |;..../* |Evening |
|00002190| 62 65 66 6f 72 65 20 68 | 6f 6c 69 64 61 79 73 2e |before h|olidays.|
|000021a0| 2e 2e 20 2a 2f 0d 09 65 | 6c 73 65 20 69 66 20 28 |.. */..e|lse if (|
|000021b0| 28 6e 6f 77 2e 6d 6f 6e | 74 68 20 3d 3d 20 31 32 |(now.mon|th == 12|
|000021c0| 29 20 26 20 28 6e 6f 77 | 2e 64 61 79 20 3d 3d 20 |) & (now|.day == |
|000021d0| 33 31 29 20 26 20 28 6e | 6f 77 2e 68 6f 75 72 20 |31) & (n|ow.hour |
|000021e0| 3e 3d 20 31 38 29 29 0d | 09 09 2a 67 72 65 65 74 |>= 18)).|..*greet|
|000021f0| 69 6e 67 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |ing = Ne|wString(|
|00002200| 22 5c 70 69 74 27 73 20 | 4e 65 77 20 59 65 61 72 |"\pit's |New Year|
|00002210| 27 73 20 45 76 65 21 20 | 25 22 29 3b 0d 09 65 6c |'s Eve! |%");..el|
|00002220| 73 65 20 69 66 20 28 28 | 6e 6f 77 2e 6d 6f 6e 74 |se if ((|now.mont|
|00002230| 68 20 3d 3d 20 31 32 29 | 20 26 20 28 6e 6f 77 2e |h == 12)| & (now.|
|00002240| 64 61 79 20 3d 3d 20 32 | 35 29 20 26 20 28 6e 6f |day == 2|5) & (no|
|00002250| 77 2e 68 6f 75 72 20 3e | 3d 20 31 38 29 29 0d 09 |w.hour >|= 18))..|
|00002260| 09 2a 67 72 65 65 74 69 | 6e 67 20 3d 20 4e 65 77 |.*greeti|ng = New|
|00002270| 53 74 72 69 6e 67 28 22 | 5c 70 69 74 27 73 20 43 |String("|\pit's C|
|00002280| 68 72 69 73 6d 61 73 20 | 45 76 65 21 20 25 22 29 |hrismas |Eve! %")|
|00002290| 3b 0d 09 0d 09 2f 2a 20 | 49 66 20 69 74 27 73 20 |;..../* |If it's |
|000022a0| 6e 6f 74 20 61 20 68 6f | 6c 69 64 61 79 2c 20 74 |not a ho|liday, t|
|000022b0| 68 65 6e 2e 2e 2e 20 2a | 2f 0d 09 65 6c 73 65 20 |hen... *|/..else |
|000022c0| 69 66 20 28 28 6e 6f 77 | 2e 68 6f 75 72 20 3e 3d |if ((now|.hour >=|
|000022d0| 20 30 29 20 26 20 28 6e | 6f 77 2e 68 6f 75 72 20 | 0) & (n|ow.hour |
|000022e0| 3c 3d 20 34 29 29 0d 09 | 09 2a 67 72 65 65 74 69 |<= 4))..|.*greeti|
|000022f0| 6e 67 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |ng = New|String("|
|00002300| 5c 70 79 6f 75 20 73 68 | 6f 75 6c 64 20 62 65 20 |\pyou sh|ould be |
|00002310| 69 6e 20 62 65 64 21 20 | 25 22 29 3b 0d 09 65 6c |in bed! |%");..el|
|00002320| 73 65 20 69 66 20 28 28 | 6e 6f 77 2e 68 6f 75 72 |se if ((|now.hour|
|00002330| 20 3e 3d 20 35 29 20 26 | 20 28 6e 6f 77 2e 68 6f | >= 5) &| (now.ho|
|00002340| 75 72 20 3c 3d 20 31 31 | 29 29 0d 09 09 2a 67 72 |ur <= 11|))...*gr|
|00002350| 65 65 74 69 6e 67 20 3d | 20 4e 65 77 53 74 72 69 |eeting =| NewStri|
|00002360| 6e 67 28 22 5c 70 67 6f | 6f 64 20 6d 6f 72 6e 69 |ng("\pgo|od morni|
|00002370| 6e 67 2e 20 25 22 29 3b | 0d 09 65 6c 73 65 20 69 |ng. %");|..else i|
|00002380| 66 20 28 28 6e 6f 77 2e | 68 6f 75 72 20 3e 3d 20 |f ((now.|hour >= |
|00002390| 31 32 29 20 26 20 28 6e | 6f 77 2e 68 6f 75 72 20 |12) & (n|ow.hour |
|000023a0| 3c 3d 20 31 37 29 29 0d | 09 09 2a 67 72 65 65 74 |<= 17)).|..*greet|
|000023b0| 69 6e 67 20 3d 20 4e 65 | 77 53 74 72 69 6e 67 28 |ing = Ne|wString(|
|000023c0| 22 5c 70 67 6f 6f 64 20 | 61 66 74 65 72 6e 6f 6f |"\pgood |afternoo|
|000023d0| 6e 2e 20 25 22 29 3b 0d | 09 65 6c 73 65 20 69 66 |n. %");.|.else if|
|000023e0| 20 28 28 6e 6f 77 2e 68 | 6f 75 72 20 3e 3d 20 31 | ((now.h|our >= 1|
|000023f0| 38 29 20 26 20 28 6e 6f | 77 2e 68 6f 75 72 20 3c |8) & (no|w.hour <|
|00002400| 3d 20 32 33 29 29 0d 09 | 09 2a 67 72 65 65 74 69 |= 23))..|.*greeti|
|00002410| 6e 67 20 3d 20 4e 65 77 | 53 74 72 69 6e 67 28 22 |ng = New|String("|
|00002420| 5c 70 67 6f 6f 64 20 65 | 76 65 6e 69 6e 67 2e 20 |\pgood e|vening. |
|00002430| 25 22 29 3b 0d 7d 0d 0d | 42 6f 6f 6c 65 61 6e 0d |%");.}..|Boolean.|
|00002440| 68 61 6e 64 6c 65 5f 6d | 65 6e 75 73 28 6c 6f 6e |handle_m|enus(lon|
|00002450| 67 20 6d 65 6e 75 5f 63 | 68 6f 69 63 65 2c 20 42 |g menu_c|hoice, B|
|00002460| 6f 6f 6c 65 61 6e 20 70 | 72 65 66 73 29 0d 7b 09 |oolean p|refs).{.|
|00002470| 0d 09 73 74 61 74 69 63 | 20 69 6e 74 20 63 68 65 |..static| int che|
|00002480| 63 6b 65 64 5f 76 6f 69 | 63 65 20 3d 20 30 3b 0d |cked_voi|ce = 0;.|
|00002490| 09 73 68 6f 72 74 20 6d | 65 6e 75 2c 0d 09 09 20 |.short m|enu,... |
|000024a0| 20 63 68 6f 69 63 65 3b | 0d 09 53 74 72 32 35 35 | choice;|..Str255|
|000024b0| 20 64 61 5f 6e 61 6d 65 | 3b 0d 09 4d 65 6e 75 48 | da_name|;..MenuH|
|000024c0| 61 6e 64 6c 65 20 76 6f | 69 63 65 5f 6d 65 6e 75 |andle vo|ice_menu|
|000024d0| 3b 0d 09 56 6f 69 63 65 | 53 70 65 63 20 76 6f 69 |;..Voice|Spec voi|
|000024e0| 63 65 3b 0d 09 48 61 6e | 64 6c 65 20 76 6f 69 63 |ce;..Han|dle voic|
|000024f0| 65 5f 72 65 73 2c 0d 09 | 09 20 20 20 76 6f 69 63 |e_res,..|. voic|
|00002500| 65 5f 68 61 6e 64 3b 0d | 09 4f 53 45 72 72 20 65 |e_hand;.|.OSErr e|
|00002510| 72 72 3b 0d 09 0d 09 6d | 65 6e 75 20 3d 20 48 69 |rr;....m|enu = Hi|
|00002520| 57 6f 72 64 28 6d 65 6e | 75 5f 63 68 6f 69 63 65 |Word(men|u_choice|
|00002530| 29 3b 0d 09 63 68 6f 69 | 63 65 20 3d 20 4c 6f 57 |);..choi|ce = LoW|
|00002540| 6f 72 64 28 6d 65 6e 75 | 5f 63 68 6f 69 63 65 29 |ord(menu|_choice)|
|00002550| 3b 0d 09 0d 09 73 77 69 | 74 63 68 20 28 6d 65 6e |;....swi|tch (men|
|00002560| 75 29 20 7b 0d 09 09 63 | 61 73 65 20 4d 45 4e 55 |u) {...c|ase MENU|
|00002570| 5f 41 50 50 4c 45 3a 0d | 09 09 09 73 77 69 74 63 |_APPLE:.|...switc|
|00002580| 68 20 28 63 68 6f 69 63 | 65 29 20 7b 0d 09 09 09 |h (choic|e) {....|
|00002590| 09 63 61 73 65 20 31 3a | 09 09 09 09 2f 2a 20 41 |.case 1:|..../* A|
|000025a0| 62 6f 75 74 20 42 72 61 | 6e 61 67 68 20 2a 2f 0d |bout Bra|nagh */.|
|000025b0| 09 09 09 09 09 41 6c 65 | 72 74 28 41 4c 52 54 5f |.....Ale|rt(ALRT_|
|000025c0| 41 42 4f 55 54 2c 20 6e | 69 6c 29 3b 0d 09 09 09 |ABOUT, n|il);....|
|000025d0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 64 65 66 |..break;|.....def|
|000025e0| 61 75 6c 74 3a 09 09 09 | 2f 2a 20 44 41 73 20 2a |ault:...|/* DAs *|
|000025f0| 2f 0d 09 09 09 09 09 47 | 65 74 49 74 65 6d 28 47 |/......G|etItem(G|
|00002600| 65 74 4d 48 61 6e 64 6c | 65 28 4d 45 4e 55 5f 41 |etMHandl|e(MENU_A|
|00002610| 50 50 4c 45 29 2c 20 63 | 68 6f 69 63 65 2c 20 64 |PPLE), c|hoice, d|
|00002620| 61 5f 6e 61 6d 65 29 3b | 0d 09 09 09 09 09 4f 70 |a_name);|......Op|
|00002630| 65 6e 44 65 73 6b 41 63 | 63 28 64 61 5f 6e 61 6d |enDeskAc|c(da_nam|
|00002640| 65 29 3b 0d 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |e);.....|.break;.|
|00002650| 09 09 09 7d 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |...}....|break;..|
|00002660| 09 63 61 73 65 20 4d 45 | 4e 55 5f 46 49 4c 45 3a |.case ME|NU_FILE:|
|00002670| 0d 09 09 09 69 66 20 28 | 63 68 6f 69 63 65 20 3d |....if (|choice =|
|00002680| 3d 20 46 49 4c 45 5f 51 | 55 49 54 29 20 0d 09 09 |= FILE_Q|UIT) ...|
|00002690| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 09 |..return| true;..|
|000026a0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|000026b0| 4d 45 4e 55 5f 56 4f 49 | 43 45 53 3a 0d 09 09 09 |MENU_VOI|CES:....|
|000026c0| 69 66 20 28 28 70 72 65 | 66 73 20 3d 20 74 72 75 |if ((pre|fs = tru|
|000026d0| 65 29 20 26 26 20 28 63 | 68 6f 69 63 65 20 21 3d |e) && (c|hoice !=|
|000026e0| 20 30 29 29 20 7b 0d 09 | 09 09 09 76 6f 69 63 65 | 0)) {..|...voice|
|000026f0| 5f 6d 65 6e 75 20 3d 20 | 47 65 74 4d 48 61 6e 64 |_menu = |GetMHand|
|00002700| 6c 65 28 4d 45 4e 55 5f | 56 4f 49 43 45 53 29 3b |le(MENU_|VOICES);|
|00002710| 0d 09 09 09 09 69 66 20 | 28 63 68 65 63 6b 65 64 |.....if |(checked|
|00002720| 5f 76 6f 69 63 65 20 21 | 3d 20 30 29 0d 09 09 09 |_voice !|= 0)....|
|00002730| 09 09 43 68 65 63 6b 49 | 74 65 6d 28 76 6f 69 63 |..CheckI|tem(voic|
|00002740| 65 5f 6d 65 6e 75 2c 20 | 63 68 65 63 6b 65 64 5f |e_menu, |checked_|
|00002750| 76 6f 69 63 65 2c 20 66 | 61 6c 73 65 29 3b 0d 09 |voice, f|alse);..|
|00002760| 09 09 09 43 68 65 63 6b | 49 74 65 6d 28 76 6f 69 |...Check|Item(voi|
|00002770| 63 65 5f 6d 65 6e 75 2c | 20 63 68 6f 69 63 65 2c |ce_menu,| choice,|
|00002780| 20 74 72 75 65 29 3b 0d | 09 09 09 09 47 65 74 49 | true);.|....GetI|
|00002790| 6e 64 56 6f 69 63 65 28 | 63 68 6f 69 63 65 2c 20 |ndVoice(|choice, |
|000027a0| 26 76 6f 69 63 65 29 3b | 0d 09 09 09 09 76 6f 69 |&voice);|.....voi|
|000027b0| 63 65 5f 72 65 73 20 3d | 20 47 65 74 52 65 73 6f |ce_res =| GetReso|
|000027c0| 75 72 63 65 28 56 4f 49 | 43 45 5f 52 45 53 5f 54 |urce(VOI|CE_RES_T|
|000027d0| 59 50 45 2c 20 56 4f 49 | 43 45 5f 52 45 53 5f 4e |YPE, VOI|CE_RES_N|
|000027e0| 55 4d 42 29 3b 0d 09 09 | 09 09 50 74 72 54 6f 58 |UMB);...|..PtrToX|
|000027f0| 48 61 6e 64 28 28 50 74 | 72 29 26 76 6f 69 63 65 |Hand((Pt|r)&voice|
|00002800| 2c 20 76 6f 69 63 65 5f | 72 65 73 2c 20 73 69 7a |, voice_|res, siz|
|00002810| 65 6f 66 28 56 6f 69 63 | 65 53 70 65 63 29 29 3b |eof(Voic|eSpec));|
|00002820| 0d 09 09 09 09 43 68 61 | 6e 67 65 64 52 65 73 6f |.....Cha|ngedReso|
|00002830| 75 72 63 65 28 76 6f 69 | 63 65 5f 72 65 73 29 3b |urce(voi|ce_res);|
|00002840| 0d 09 09 09 09 65 72 72 | 20 3d 20 52 65 73 45 72 |.....err| = ResEr|
|00002850| 72 6f 72 28 29 3b 0d 09 | 09 09 09 69 66 20 28 65 |ror();..|...if (e|
|00002860| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |rr != no|Err)....|
|00002870| 09 09 53 79 73 42 65 65 | 70 28 32 30 29 3b 0d 09 |..SysBee|p(20);..|
|00002880| 09 09 7d 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 7d |..}....b|reak;..}|
|00002890| 0d 09 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |..return| false;.|
|000028a0| 7d 0d 0d 73 74 6f 70 5f | 73 70 65 65 63 68 28 53 |}..stop_|speech(S|
|000028b0| 70 65 65 63 68 43 68 61 | 6e 6e 65 6c 20 63 68 61 |peechCha|nnel cha|
|000028c0| 6e 6e 65 6c 29 0d 7b 0d | 09 4f 53 45 72 72 20 65 |nnel).{.|.OSErr e|
|000028d0| 72 72 3b 0d 09 0d 09 65 | 72 72 20 3d 20 53 74 6f |rr;....e|rr = Sto|
|000028e0| 70 53 70 65 65 63 68 41 | 74 28 63 68 61 6e 6e 65 |pSpeechA|t(channe|
|000028f0| 6c 2c 20 6b 45 6e 64 4f | 66 57 6f 72 64 29 3b 0d |l, kEndO|fWord);.|
|00002900| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00002910| 72 29 0d 09 09 53 79 73 | 42 65 65 70 28 32 30 29 |r)...Sys|Beep(20)|
|00002920| 3b 0d 09 77 68 69 6c 65 | 20 28 53 70 65 65 63 68 |;..while| (Speech|
|00002930| 42 75 73 79 28 29 20 3e | 20 30 29 3b 0d 7d 0d 0d |Busy() >| 0);.}..|
|00002940| 6d 61 69 6e 28 29 0d 7b | 0d 09 6c 6f 6e 67 20 69 |main().{|..long i|
|00002950| 6e 66 6f 2c 0d 09 09 20 | 74 69 63 6b 73 2c 0d 09 |nfo,... |ticks,..|
|00002960| 09 20 6d 65 6e 75 5f 63 | 68 6f 69 63 65 3b 0d 09 |. menu_c|hoice;..|
|00002970| 69 6e 74 20 69 3b 0d 09 | 42 6f 6f 6c 65 61 6e 20 |int i;..|Boolean |
|00002980| 64 6f 6e 65 20 3d 20 66 | 61 6c 73 65 2c 0d 09 09 |done = f|alse,...|
|00002990| 09 70 72 65 66 73 3b 0d | 09 45 76 65 6e 74 52 65 |.prefs;.|.EventRe|
|000029a0| 63 6f 72 64 20 63 68 6f | 69 63 65 3b 0d 09 73 68 |cord cho|ice;..sh|
|000029b0| 6f 72 74 20 69 6e 64 65 | 78 3b 0d 09 53 74 72 69 |ort inde|x;..Stri|
|000029c0| 6e 67 48 61 6e 64 6c 65 | 20 6d 6f 6e 74 68 2c 0d |ngHandle| month,.|
|000029d0| 09 09 09 09 20 64 61 79 | 2c 0d 09 09 09 09 20 77 |.... day|,..... w|
|000029e0| 65 65 6b 64 61 79 2c 0d | 09 09 09 09 20 74 69 6d |eekday,.|.... tim|
|000029f0| 65 2c 0d 09 09 09 09 20 | 67 72 65 65 74 69 6e 67 |e,..... |greeting|
|00002a00| 2c 0d 09 09 09 09 20 74 | 65 78 74 3b 0d 09 4f 53 |,..... t|ext;..OS|
|00002a10| 45 72 72 20 65 72 72 3b | 0d 09 56 6f 69 63 65 53 |Err err;|..VoiceS|
|00002a20| 70 65 63 20 76 6f 69 63 | 65 3b 0d 09 56 6f 69 63 |pec voic|e;..Voic|
|00002a30| 65 44 65 73 63 72 69 70 | 74 69 6f 6e 20 76 6f 69 |eDescrip|tion voi|
|00002a40| 63 65 5f 69 6e 66 6f 3b | 0d 09 53 70 65 65 63 68 |ce_info;|..Speech|
|00002a50| 43 68 61 6e 6e 65 6c 20 | 63 68 61 6e 6e 65 6c 3b |Channel |channel;|
|00002a60| 0d 09 44 69 61 6c 6f 67 | 50 74 72 20 76 6f 69 63 |..Dialog|Ptr voic|
|00002a70| 65 5f 64 6c 6f 67 3b 0d | 09 48 61 6e 64 6c 65 20 |e_dlog;.|.Handle |
|00002a80| 6d 65 6e 75 5f 62 61 72 | 2c 0d 09 09 20 20 20 64 |menu_bar|,... d|
|00002a90| 65 66 61 75 6c 74 5f 76 | 6f 69 63 65 3b 0d 09 4d |efault_v|oice;..M|
|00002aa0| 65 6e 75 48 61 6e 64 6c | 65 20 6d 65 6e 75 2c 0d |enuHandl|e menu,.|
|00002ab0| 09 09 09 20 20 20 76 6f | 69 63 65 5f 6d 65 6e 75 |... vo|ice_menu|
|00002ac0| 3b 0d 09 50 6f 69 6e 74 | 20 77 68 65 72 65 3b 0d |;..Point| where;.|
|00002ad0| 09 57 69 6e 64 6f 77 50 | 74 72 20 77 68 69 63 68 |.WindowP|tr which|
|00002ae0| 5f 77 69 6e 64 6f 77 3b | 0d 09 42 6f 6f 6c 65 61 |_window;|..Boolea|
|00002af0| 6e 20 67 61 6c 61 74 65 | 61 20 3d 20 66 61 6c 73 |n galate|a = fals|
|00002b00| 65 3b 0d 09 65 78 74 65 | 72 6e 20 73 68 6f 72 74 |e;..exte|rn short|
|00002b10| 20 70 72 65 66 73 5f 66 | 69 6c 65 5f 72 65 66 6e | prefs_f|ile_refn|
|00002b20| 75 6d 2c 0d 09 09 09 09 | 20 76 6f 6c 5f 72 65 66 |um,.....| vol_ref|
|00002b30| 6e 75 6d 3b 0d 09 0d 09 | 74 6f 6f 6c 62 6f 78 5f |num;....|toolbox_|
|00002b40| 69 6e 69 74 28 29 3b 0d | 09 46 6c 75 73 68 45 76 |init();.|.FlushEv|
|00002b50| 65 6e 74 73 28 65 76 65 | 72 79 45 76 65 6e 74 2c |ents(eve|ryEvent,|
|00002b60| 20 30 29 3b 0d 09 70 72 | 65 66 73 20 3d 20 70 72 | 0);..pr|efs = pr|
|00002b70| 65 66 73 5f 69 6e 69 74 | 28 29 3b 0d 09 0d 09 6d |efs_init|();....m|
|00002b80| 65 6e 75 5f 62 61 72 20 | 3d 20 47 65 74 4e 65 77 |enu_bar |= GetNew|
|00002b90| 4d 42 61 72 28 4d 45 4e | 55 5f 42 41 52 29 3b 09 |MBar(MEN|U_BAR);.|
|00002ba0| 09 09 2f 2a 20 53 65 74 | 20 75 70 20 6d 65 6e 75 |../* Set| up menu|
|00002bb0| 73 2e 2e 2e 20 2a 2f 0d | 09 69 66 20 28 6d 65 6e |s... */.|.if (men|
|00002bc0| 75 5f 62 61 72 20 3d 3d | 20 6e 69 6c 29 20 7b 0d |u_bar ==| nil) {.|
|00002bd0| 09 09 53 79 73 42 65 65 | 70 28 32 30 29 3b 0d 09 |..SysBee|p(20);..|
|00002be0| 09 72 65 74 75 72 6e 3b | 0d 09 7d 0d 09 65 6c 73 |.return;|..}..els|
|00002bf0| 65 20 0d 09 09 53 65 74 | 4d 65 6e 75 42 61 72 28 |e ...Set|MenuBar(|
|00002c00| 6d 65 6e 75 5f 62 61 72 | 29 3b 0d 09 09 0d 09 6d |menu_bar|);.....m|
|00002c10| 65 6e 75 20 3d 20 47 65 | 74 4d 48 61 6e 64 6c 65 |enu = Ge|tMHandle|
|00002c20| 28 4d 45 4e 55 5f 41 50 | 50 4c 45 29 3b 0d 09 41 |(MENU_AP|PLE);..A|
|00002c30| 64 64 52 65 73 4d 65 6e | 75 28 6d 65 6e 75 2c 20 |ddResMen|u(menu, |
|00002c40| 27 44 52 56 52 27 29 3b | 0d 09 0d 09 65 72 72 20 |'DRVR');|....err |
|00002c50| 3d 20 47 65 73 74 61 6c | 74 28 67 65 73 74 61 6c |= Gestal|t(gestal|
|00002c60| 74 53 70 65 65 63 68 41 | 74 74 72 2c 20 26 69 6e |tSpeechA|ttr, &in|
|00002c70| 66 6f 29 3b 0d 09 69 66 | 20 28 65 72 72 20 3d 3d |fo);..if| (err ==|
|00002c80| 20 67 65 73 74 61 6c 74 | 55 6e 64 65 66 53 65 6c | gestalt|UndefSel|
|00002c90| 65 63 74 6f 72 45 72 72 | 29 20 7b 0d 09 09 50 61 |ectorErr|) {...Pa|
|00002ca0| 72 61 6d 54 65 78 74 28 | 22 5c 70 57 65 6c 63 6f |ramText(|"\pWelco|
|00002cb0| 6d 65 21 20 72 65 71 75 | 69 72 65 73 20 74 68 61 |me! requ|ires tha|
|00002cc0| 74 20 74 68 65 20 53 70 | 65 65 63 68 20 4d 61 6e |t the Sp|eech Man|
|00002cd0| 61 67 65 72 20 62 65 20 | 69 6e 73 74 61 6c 6c 65 |ager be |installe|
|00002ce0| 64 2e 20 53 6f 72 72 79 | 2e 22 2c 20 22 5c 70 22 |d. Sorry|.", "\p"|
|00002cf0| 2c 20 22 5c 70 22 2c 20 | 22 5c 70 22 29 3b 0d 09 |, "\p", |"\p");..|
|00002d00| 09 53 74 6f 70 41 6c 65 | 72 74 28 41 4c 52 54 5f |.StopAle|rt(ALRT_|
|00002d10| 45 52 52 2c 20 6e 69 6c | 29 3b 0d 09 09 53 79 73 |ERR, nil|);...Sys|
|00002d20| 42 65 65 70 28 32 30 29 | 3b 0d 09 09 72 65 74 75 |Beep(20)|;...retu|
|00002d30| 72 6e 3b 0d 09 7d 0d 09 | 65 6c 73 65 20 69 66 20 |rn;..}..|else if |
|00002d40| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 20 7b |(err != |noErr) {|
|00002d50| 0d 09 09 50 61 72 61 6d | 54 65 78 74 28 22 5c 70 |...Param|Text("\p|
|00002d60| 50 72 6f 62 6c 65 6d 20 | 63 61 6c 6c 69 6e 67 20 |Problem |calling |
|00002d70| 47 65 73 74 61 6c 74 3a | 20 65 78 69 74 69 6e 67 |Gestalt:| exiting|
|00002d80| 2e 22 2c 20 22 5c 70 22 | 2c 20 22 5c 70 22 2c 20 |.", "\p"|, "\p", |
|00002d90| 22 5c 70 22 29 3b 0d 09 | 09 53 74 6f 70 41 6c 65 |"\p");..|.StopAle|
|00002da0| 72 74 28 41 4c 52 54 5f | 45 52 52 2c 20 6e 69 6c |rt(ALRT_|ERR, nil|
|00002db0| 29 3b 0d 09 09 53 79 73 | 42 65 65 70 28 32 30 29 |);...Sys|Beep(20)|
|00002dc0| 3b 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 7d 0d 09 |;...retu|rn;..}..|
|00002dd0| 0d 09 69 66 20 28 21 28 | 69 6e 66 6f 20 26 26 20 |..if (!(|info && |
|00002de0| 28 31 4c 20 3c 3c 20 67 | 65 73 74 61 6c 74 53 70 |(1L << g|estaltSp|
|00002df0| 65 65 63 68 4d 67 72 50 | 72 65 73 65 6e 74 29 29 |eechMgrP|resent))|
|00002e00| 29 20 7b 0d 09 09 50 61 | 72 61 6d 54 65 78 74 28 |) {...Pa|ramText(|
|00002e10| 22 5c 70 57 65 6c 63 6f | 6d 65 21 20 72 65 71 75 |"\pWelco|me! requ|
|00002e20| 69 72 65 73 20 74 68 61 | 74 20 74 68 65 20 53 70 |ires tha|t the Sp|
|00002e30| 65 65 63 68 20 4d 61 6e | 61 67 65 72 20 62 65 20 |eech Man|ager be |
|00002e40| 69 6e 73 74 61 6c 6c 65 | 64 2e 20 53 6f 72 72 79 |installe|d. Sorry|
|00002e50| 2e 22 2c 20 22 5c 70 22 | 2c 20 22 5c 70 22 2c 20 |.", "\p"|, "\p", |
|00002e60| 22 5c 70 22 29 3b 0d 09 | 09 53 74 6f 70 41 6c 65 |"\p");..|.StopAle|
|00002e70| 72 74 28 41 4c 52 54 5f | 45 52 52 2c 20 6e 69 6c |rt(ALRT_|ERR, nil|
|00002e80| 29 3b 0d 09 09 53 79 73 | 42 65 65 70 28 32 30 29 |);...Sys|Beep(20)|
|00002e90| 3b 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 7d 0d 0d |;...retu|rn;..}..|
|00002ea0| 09 65 72 72 20 3d 20 43 | 6f 75 6e 74 56 6f 69 63 |.err = C|ountVoic|
|00002eb0| 65 73 28 26 69 6e 64 65 | 78 29 3b 09 09 09 2f 2a |es(&inde|x);.../*|
|00002ec0| 20 48 6f 77 20 6d 61 6e | 79 20 76 6f 69 63 65 73 | How man|y voices|
|00002ed0| 20 64 6f 20 77 65 20 68 | 61 76 65 3f 20 2a 2f 0d | do we h|ave? */.|
|00002ee0| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00002ef0| 72 29 20 7b 0d 09 09 50 | 61 72 61 6d 54 65 78 74 |r) {...P|aramText|
|00002f00| 28 22 5c 70 49 20 72 65 | 61 6c 6c 79 20 64 6f 6e |("\pI re|ally don|
|00002f10| 27 74 20 74 68 69 6e 6b | 20 74 68 65 72 65 20 73 |'t think| there s|
|00002f20| 68 6f 75 6c 64 20 68 61 | 76 65 20 62 65 65 6e 20 |hould ha|ve been |
|00002f30| 61 6e 20 65 72 72 6f 72 | 20 68 65 72 65 2e 2e 2e |an error| here...|
|00002f40| 22 2c 20 22 5c 70 22 2c | 20 22 5c 70 22 2c 20 22 |", "\p",| "\p", "|
|00002f50| 5c 70 22 29 3b 0d 09 09 | 53 74 6f 70 41 6c 65 72 |\p");...|StopAler|
|00002f60| 74 28 41 4c 52 54 5f 45 | 52 52 2c 20 6e 69 6c 29 |t(ALRT_E|RR, nil)|
|00002f70| 3b 0d 09 09 53 79 73 42 | 65 65 70 28 32 30 29 3b |;...SysB|eep(20);|
|00002f80| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 7d 0d 0d 09 |...retur|n;..}...|
|00002f90| 76 6f 69 63 65 5f 6d 65 | 6e 75 20 3d 20 47 65 74 |voice_me|nu = Get|
|00002fa0| 4d 48 61 6e 64 6c 65 28 | 4d 45 4e 55 5f 56 4f 49 |MHandle(|MENU_VOI|
|00002fb0| 43 45 53 29 3b 0d 09 66 | 6f 72 20 28 69 20 3d 20 |CES);..f|or (i = |
|00002fc0| 31 3b 20 69 20 3c 3d 20 | 69 6e 64 65 78 3b 20 69 |1; i <= |index; i|
|00002fd0| 2b 2b 29 20 7b 0d 09 09 | 65 72 72 20 3d 20 47 65 |++) {...|err = Ge|
|00002fe0| 74 49 6e 64 56 6f 69 63 | 65 28 69 2c 20 26 76 6f |tIndVoic|e(i, &vo|
|00002ff0| 69 63 65 29 3b 0d 09 09 | 69 66 20 28 65 72 72 20 |ice);...|if (err |
|00003000| 21 3d 20 6e 6f 45 72 72 | 29 20 7b 0d 09 09 09 50 |!= noErr|) {....P|
|00003010| 61 72 61 6d 54 65 78 74 | 28 22 5c 70 43 6f 75 6c |aramText|("\pCoul|
|00003020| 64 6e 27 74 20 66 69 6e | 64 20 69 6e 64 69 63 61 |dn't fin|d indica|
|00003030| 74 65 64 20 76 6f 69 63 | 65 2e 20 45 78 69 74 69 |ted voic|e. Exiti|
|00003040| 6e 67 2e 22 2c 20 22 5c | 70 22 2c 20 22 5c 70 22 |ng.", "\|p", "\p"|
|00003050| 2c 20 22 5c 70 22 29 3b | 0d 09 09 09 53 74 6f 70 |, "\p");|....Stop|
|00003060| 41 6c 65 72 74 28 41 4c | 52 54 5f 45 52 52 2c 20 |Alert(AL|RT_ERR, |
|00003070| 6e 69 6c 29 3b 0d 09 09 | 09 53 79 73 42 65 65 70 |nil);...|.SysBeep|
|00003080| 28 32 30 29 3b 0d 09 09 | 09 72 65 74 75 72 6e 3b |(20);...|.return;|
|00003090| 0d 09 09 7d 0d 09 09 47 | 65 74 56 6f 69 63 65 44 |...}...G|etVoiceD|
|000030a0| 65 73 63 72 69 70 74 69 | 6f 6e 28 26 76 6f 69 63 |escripti|on(&voic|
|000030b0| 65 2c 20 26 76 6f 69 63 | 65 5f 69 6e 66 6f 2c 20 |e, &voic|e_info, |
|000030c0| 73 69 7a 65 6f 66 28 56 | 6f 69 63 65 44 65 73 63 |sizeof(V|oiceDesc|
|000030d0| 72 69 70 74 69 6f 6e 29 | 29 3b 0d 09 09 41 70 70 |ription)|);...App|
|000030e0| 65 6e 64 4d 65 6e 75 28 | 76 6f 69 63 65 5f 6d 65 |endMenu(|voice_me|
|000030f0| 6e 75 2c 20 76 6f 69 63 | 65 5f 69 6e 66 6f 2e 6e |nu, voic|e_info.n|
|00003100| 61 6d 65 29 3b 0d 09 09 | 69 66 20 28 28 76 6f 69 |ame);...|if ((voi|
|00003110| 63 65 2e 63 72 65 61 74 | 6f 72 20 3d 3d 20 27 67 |ce.creat|or == 'g|
|00003120| 61 6c 61 27 29 20 26 26 | 20 28 76 6f 69 63 65 2e |ala') &&| (voice.|
|00003130| 69 64 20 3d 3d 20 31 32 | 29 29 09 2f 2a 20 49 66 |id == 12|))./* If|
|00003140| 20 22 46 65 6d 61 6c 65 | 20 76 6f 69 63 65 22 20 | "Female| voice" |
|00003150| 69 73 20 61 76 61 69 6c | 61 62 6c 65 2c 2a 2f 0d |is avail|able,*/.|
|00003160| 09 09 09 67 61 6c 61 74 | 65 61 20 3d 20 74 72 75 |...galat|ea = tru|
|00003170| 65 3b 09 09 09 09 09 09 | 09 09 09 2f 2a 20 75 73 |e;......|.../* us|
|00003180| 65 20 69 74 2c 20 75 6e | 6c 65 73 73 20 6f 76 65 |e it, un|less ove|
|00003190| 72 72 75 6c 65 64 20 2a | 2f 0d 09 7d 0d 09 0d 09 |rruled *|/..}....|
|000031a0| 44 72 61 77 4d 65 6e 75 | 42 61 72 28 29 3b 0d 09 |DrawMenu|Bar();..|
|000031b0| 0d 09 64 65 66 61 75 6c | 74 5f 76 6f 69 63 65 20 |..defaul|t_voice |
|000031c0| 3d 20 47 65 74 52 65 73 | 6f 75 72 63 65 28 56 4f |= GetRes|ource(VO|
|000031d0| 49 43 45 5f 52 45 53 5f | 54 59 50 45 2c 20 56 4f |ICE_RES_|TYPE, VO|
|000031e0| 49 43 45 5f 52 45 53 5f | 4e 55 4d 42 29 3b 0d 09 |ICE_RES_|NUMB);..|
|000031f0| 48 4c 6f 63 6b 28 64 65 | 66 61 75 6c 74 5f 76 6f |HLock(de|fault_vo|
|00003200| 69 63 65 29 3b 0d 09 69 | 66 20 28 28 28 56 6f 69 |ice);..i|f (((Voi|
|00003210| 63 65 53 70 65 63 20 2a | 29 2a 64 65 66 61 75 6c |ceSpec *|)*defaul|
|00003220| 74 5f 76 6f 69 63 65 29 | 2d 3e 63 72 65 61 74 6f |t_voice)|->creato|
|00003230| 72 20 21 3d 20 27 3f 3f | 3f 3f 27 29 20 7b 0d 09 |r != '??|??') {..|
|00003240| 09 76 6f 69 63 65 2e 63 | 72 65 61 74 6f 72 20 3d |.voice.c|reator =|
|00003250| 20 28 28 56 6f 69 63 65 | 53 70 65 63 20 2a 29 2a | ((Voice|Spec *)*|
|00003260| 64 65 66 61 75 6c 74 5f | 76 6f 69 63 65 29 2d 3e |default_|voice)->|
|00003270| 63 72 65 61 74 6f 72 3b | 0d 09 09 76 6f 69 63 65 |creator;|...voice|
|00003280| 2e 69 64 20 3d 20 28 28 | 56 6f 69 63 65 53 70 65 |.id = ((|VoiceSpe|
|00003290| 63 20 2a 29 2a 64 65 66 | 61 75 6c 74 5f 76 6f 69 |c *)*def|ault_voi|
|000032a0| 63 65 29 2d 3e 69 64 3b | 0d 09 09 47 65 74 56 6f |ce)->id;|...GetVo|
|000032b0| 69 63 65 44 65 73 63 72 | 69 70 74 69 6f 6e 28 26 |iceDescr|iption(&|
|000032c0| 76 6f 69 63 65 2c 20 26 | 76 6f 69 63 65 5f 69 6e |voice, &|voice_in|
|000032d0| 66 6f 2c 20 73 69 7a 65 | 6f 66 28 56 6f 69 63 65 |fo, size|of(Voice|
|000032e0| 44 65 73 63 72 69 70 74 | 69 6f 6e 29 29 3b 0d 09 |Descript|ion));..|
|000032f0| 09 67 61 6c 61 74 65 61 | 20 3d 20 66 61 6c 73 65 |.galatea| = false|
|00003300| 3b 0d 09 7d 0d 09 48 55 | 6e 6c 6f 63 6b 28 64 65 |;..}..HU|nlock(de|
|00003310| 66 61 75 6c 74 5f 76 6f | 69 63 65 29 3b 0d 09 0d |fault_vo|ice);...|
|00003320| 09 69 66 20 28 67 61 6c | 61 74 65 61 29 20 7b 0d |.if (gal|atea) {.|
|00003330| 09 09 76 6f 69 63 65 2e | 63 72 65 61 74 6f 72 20 |..voice.|creator |
|00003340| 3d 20 27 67 61 6c 61 27 | 3b 0d 09 09 76 6f 69 63 |= 'gala'|;...voic|
|00003350| 65 2e 69 64 20 3d 20 28 | 6c 6f 6e 67 29 31 32 3b |e.id = (|long)12;|
|00003360| 0d 09 09 47 65 74 56 6f | 69 63 65 44 65 73 63 72 |...GetVo|iceDescr|
|00003370| 69 70 74 69 6f 6e 28 26 | 76 6f 69 63 65 2c 20 26 |iption(&|voice, &|
|00003380| 76 6f 69 63 65 5f 69 6e | 66 6f 2c 20 73 69 7a 65 |voice_in|fo, size|
|00003390| 6f 66 28 56 6f 69 63 65 | 44 65 73 63 72 69 70 74 |of(Voice|Descript|
|000033a0| 69 6f 6e 29 29 3b 0d 09 | 7d 0d 09 0d 09 65 72 72 |ion));..|}....err|
|000033b0| 20 3d 20 4e 65 77 53 70 | 65 65 63 68 43 68 61 6e | = NewSp|eechChan|
|000033c0| 6e 65 6c 28 26 76 6f 69 | 63 65 2c 20 26 63 68 61 |nel(&voi|ce, &cha|
|000033d0| 6e 6e 65 6c 29 3b 09 2f | 2a 20 4f 70 65 6e 20 61 |nnel);./|* Open a|
|000033e0| 20 53 70 65 65 63 68 43 | 68 61 6e 6e 65 6c 20 2a | SpeechC|hannel *|
|000033f0| 2f 0d 09 69 66 20 28 65 | 72 72 20 3d 3d 20 73 79 |/..if (e|rr == sy|
|00003400| 6e 74 68 4f 70 65 6e 46 | 61 69 6c 65 64 29 20 7b |nthOpenF|ailed) {|
|00003410| 0d 09 09 50 61 72 61 6d | 54 65 78 74 28 22 5c 70 |...Param|Text("\p|
|00003420| 43 6f 75 6c 64 20 6e 6f | 74 20 6f 70 65 6e 20 53 |Could no|t open S|
|00003430| 70 65 65 63 68 43 68 61 | 6e 6e 65 6c 3a 20 54 72 |peechCha|nnel: Tr|
|00003440| 79 20 69 6e 63 72 65 61 | 73 69 6e 67 20 74 68 65 |y increa|sing the|
|00003450| 20 6d 65 6d 6f 72 79 20 | 70 61 72 74 69 74 69 6f | memory |partitio|
|00003460| 6e 2e 22 2c 20 22 5c 70 | 22 2c 20 22 5c 70 22 2c |n.", "\p|", "\p",|
|00003470| 20 22 5c 70 22 29 3b 0d | 09 09 53 74 6f 70 41 6c | "\p");.|..StopAl|
|00003480| 65 72 74 28 41 4c 52 54 | 5f 45 52 52 2c 20 6e 69 |ert(ALRT|_ERR, ni|
|00003490| 6c 29 3b 0d 09 09 72 65 | 74 75 72 6e 3b 0d 09 7d |l);...re|turn;..}|
|000034a0| 0d 09 65 6c 73 65 20 69 | 66 20 28 65 72 72 20 21 |..else i|f (err !|
|000034b0| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 50 61 72 |= noErr)| {...Par|
|000034c0| 61 6d 54 65 78 74 28 22 | 5c 70 43 6f 75 6c 64 20 |amText("|\pCould |
|000034d0| 6e 6f 74 20 6f 70 65 6e | 20 53 70 65 65 63 68 43 |not open| SpeechC|
|000034e0| 68 61 6e 6e 65 6c 3a 20 | 65 78 69 74 69 6e 67 2e |hannel: |exiting.|
|000034f0| 22 2c 20 22 5c 70 22 2c | 20 22 5c 70 22 2c 20 22 |", "\p",| "\p", "|
|00003500| 5c 70 22 29 3b 0d 09 09 | 53 74 6f 70 41 6c 65 72 |\p");...|StopAler|
|00003510| 74 28 41 4c 52 54 5f 45 | 52 52 2c 20 6e 69 6c 29 |t(ALRT_E|RR, nil)|
|00003520| 3b 0d 09 09 53 79 73 42 | 65 65 70 28 32 30 29 3b |;...SysB|eep(20);|
|00003530| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 7d 0d 09 0d |...retur|n;..}...|
|00003540| 09 50 61 72 61 6d 54 65 | 78 74 28 76 6f 69 63 65 |.ParamTe|xt(voice|
|00003550| 5f 69 6e 66 6f 2e 6e 61 | 6d 65 2c 20 22 5c 70 22 |_info.na|me, "\p"|
|00003560| 2c 20 22 5c 70 22 2c 20 | 22 5c 70 22 29 3b 0d 09 |, "\p", |"\p");..|
|00003570| 76 6f 69 63 65 5f 64 6c | 6f 67 20 3d 20 47 65 74 |voice_dl|og = Get|
|00003580| 4e 65 77 44 69 61 6c 6f | 67 28 44 4c 4f 47 5f 56 |NewDialo|g(DLOG_V|
|00003590| 4f 49 43 45 2c 20 6e 69 | 6c 2c 20 57 49 4e 44 4f |OICE, ni|l, WINDO|
|000035a0| 57 5f 49 4e 5f 46 52 4f | 4e 54 29 3b 0d 09 69 66 |W_IN_FRO|NT);..if|
|000035b0| 20 28 76 6f 69 63 65 5f | 64 6c 6f 67 20 3d 3d 20 | (voice_|dlog == |
|000035c0| 6e 69 6c 29 20 7b 0d 09 | 09 50 61 72 61 6d 54 65 |nil) {..|.ParamTe|
|000035d0| 78 74 28 22 5c 70 43 61 | 6e 27 74 20 73 68 6f 77 |xt("\pCa|n't show|
|000035e0| 20 63 75 72 72 65 6e 74 | 20 76 6f 69 63 65 2e 2e | current| voice..|
|000035f0| 2e 22 2c 20 22 5c 70 22 | 2c 20 22 5c 70 22 2c 20 |.", "\p"|, "\p", |
|00003600| 22 5c 70 22 29 3b 0d 09 | 09 53 74 6f 70 41 6c 65 |"\p");..|.StopAle|
|00003610| 72 74 28 41 4c 52 54 5f | 45 52 52 2c 20 6e 69 6c |rt(ALRT_|ERR, nil|
|00003620| 29 3b 0d 09 7d 0d 09 53 | 68 6f 77 57 69 6e 64 6f |);..}..S|howWindo|
|00003630| 77 28 76 6f 69 63 65 5f | 64 6c 6f 67 29 3b 0d 09 |w(voice_|dlog);..|
|00003640| 44 72 61 77 44 69 61 6c | 6f 67 28 76 6f 69 63 65 |DrawDial|og(voice|
|00003650| 5f 64 6c 6f 67 29 3b 0d | 09 0d 09 64 61 74 65 5f |_dlog);.|...date_|
|00003660| 74 6f 5f 74 65 78 74 28 | 26 6d 6f 6e 74 68 2c 20 |to_text(|&month, |
|00003670| 26 64 61 79 2c 20 26 77 | 65 65 6b 64 61 79 2c 20 |&day, &w|eekday, |
|00003680| 26 74 69 6d 65 2c 20 26 | 67 72 65 65 74 69 6e 67 |&time, &|greeting|
|00003690| 29 3b 0d 09 0d 09 2f 2a | 20 50 6c 75 67 20 65 76 |);..../*| Plug ev|
|000036a0| 65 72 79 74 68 69 6e 67 | 20 69 6e 74 6f 20 6f 6e |erything| into on|
|000036b0| 65 20 6c 6f 6e 67 20 73 | 74 72 69 6e 67 2e 2e 2e |e long s|tring...|
|000036c0| 20 2a 2f 0d 09 74 65 78 | 74 20 3d 20 4e 65 77 53 | */..tex|t = NewS|
|000036d0| 74 72 69 6e 67 28 22 5c | 70 57 65 6c 63 6f 6d 65 |tring("\|pWelcome|
|000036e0| 20 74 6f 20 4d 61 63 6b | 69 6e 74 6f 73 68 2c 20 | to Mack|intosh, |
|000036f0| 61 6e 64 20 25 22 29 3b | 0d 09 53 65 74 48 61 6e |and %");|..SetHan|
|00003700| 64 6c 65 53 69 7a 65 28 | 74 65 78 74 2c 20 73 69 |dleSize(|text, si|
|00003710| 7a 65 6f 66 28 53 74 72 | 32 35 35 29 29 3b 0d 09 |zeof(Str|255));..|
|00003720| 4d 75 6e 67 65 72 28 74 | 65 78 74 2c 20 31 2c 20 |Munger(t|ext, 1, |
|00003730| 22 25 22 2c 20 31 2c 20 | 2a 67 72 65 65 74 69 6e |"%", 1, |*greetin|
|00003740| 67 2b 31 2c 20 2a 2a 67 | 72 65 65 74 69 6e 67 29 |g+1, **g|reeting)|
|00003750| 3b 20 09 2f 2a 20 46 69 | 6e 64 20 74 68 65 20 25 |; ./* Fi|nd the %|
|00003760| 2c 20 61 6e 64 20 72 65 | 70 6c 61 63 65 20 69 74 |, and re|place it|
|00003770| 20 77 69 74 68 20 2a 2f | 0d 09 2a 2a 74 65 78 74 | with */|..**text|
|00003780| 20 3d 20 2a 2a 74 65 78 | 74 20 2b 20 2a 2a 67 72 | = **tex|t + **gr|
|00003790| 65 65 74 69 6e 67 20 2d | 20 31 3b 09 09 09 09 09 |eeting -| 1;.....|
|000037a0| 2f 2a 20 74 68 65 20 6e | 65 78 74 20 70 61 72 74 |/* the n|ext part|
|000037b0| 20 6f 66 20 74 68 65 20 | 73 74 72 69 6e 67 2e 2e | of the |string..|
|000037c0| 2e 20 2a 2f 0d 09 4d 75 | 6e 67 65 72 28 74 65 78 |. */..Mu|nger(tex|
|000037d0| 74 2c 20 31 2c 20 22 25 | 22 2c 20 31 2c 20 22 49 |t, 1, "%|", 1, "I|
|000037e0| 74 27 73 20 25 22 2c 20 | 36 29 3b 0d 09 2a 2a 74 |t's %", |6);..**t|
|000037f0| 65 78 74 20 3d 20 2a 2a | 74 65 78 74 20 2b 20 35 |ext = **|text + 5|
|00003800| 3b 09 09 09 09 09 09 09 | 09 2f 2a 20 46 69 78 20 |;.......|./* Fix |
|00003810| 74 68 65 20 6c 65 6e 67 | 74 68 20 62 79 74 65 2c |the leng|th byte,|
|00003820| 20 69 67 6e 6f 72 69 6e | 67 20 74 68 65 20 2a 2f | ignorin|g the */|
|00003830| 0d 09 4d 75 6e 67 65 72 | 28 74 65 78 74 2c 20 31 |..Munger|(text, 1|
|00003840| 2c 20 22 25 22 2c 20 31 | 2c 20 2a 77 65 65 6b 64 |, "%", 1|, *weekd|
|00003850| 61 79 2b 31 2c 20 2a 2a | 77 65 65 6b 64 61 79 29 |ay+1, **|weekday)|
|00003860| 3b 09 09 2f 2a 20 6c 65 | 6e 67 74 68 20 62 79 74 |;../* le|ngth byt|
|00003870| 65 20 66 72 6f 6d 20 74 | 68 65 20 72 65 70 6c 61 |e from t|he repla|
|00003880| 63 65 6d 65 6e 74 20 73 | 74 72 69 6e 67 2a 2f 0d |cement s|tring*/.|
|00003890| 09 2a 2a 74 65 78 74 20 | 3d 20 2a 2a 74 65 78 74 |.**text |= **text|
|000038a0| 20 2b 20 2a 2a 77 65 65 | 6b 64 61 79 20 2d 20 31 | + **wee|kday - 1|
|000038b0| 3b 09 09 09 09 09 2f 2a | 20 28 69 74 20 67 6f 74 |;...../*| (it got|
|000038c0| 20 63 75 74 20 6f 75 74 | 2c 20 2a 77 65 65 6b 64 | cut out|, *weekd|
|000038d0| 61 79 2b 31 2c 20 61 6e | 79 77 61 79 29 20 2a 2f |ay+1, an|yway) */|
|000038e0| 0d 09 4d 75 6e 67 65 72 | 28 74 65 78 74 2c 20 31 |..Munger|(text, 1|
|000038f0| 2c 20 22 25 22 2c 20 31 | 2c 20 2a 6d 6f 6e 74 68 |, "%", 1|, *month|
|00003900| 2b 31 2c 20 2a 2a 6d 6f | 6e 74 68 29 3b 0d 09 2a |+1, **mo|nth);..*|
|00003910| 2a 74 65 78 74 20 3d 20 | 2a 2a 74 65 78 74 20 2b |*text = |**text +|
|00003920| 20 2a 2a 6d 6f 6e 74 68 | 20 2d 20 31 3b 0d 09 4d | **month| - 1;..M|
|00003930| 75 6e 67 65 72 28 74 65 | 78 74 2c 20 31 2c 20 22 |unger(te|xt, 1, "|
|00003940| 25 22 2c 20 31 2c 20 2a | 64 61 79 2b 31 2c 20 2a |%", 1, *|day+1, *|
|00003950| 2a 64 61 79 29 3b 0d 09 | 2a 2a 74 65 78 74 20 3d |*day);..|**text =|
|00003960| 20 2a 2a 74 65 78 74 20 | 2b 20 2a 2a 64 61 79 20 | **text |+ **day |
|00003970| 2d 20 31 3b 0d 09 4d 75 | 6e 67 65 72 28 74 65 78 |- 1;..Mu|nger(tex|
|00003980| 74 2c 20 31 2c 20 22 25 | 22 2c 20 31 2c 20 22 61 |t, 1, "%|", 1, "a|
|00003990| 74 20 25 22 2c 20 34 29 | 3b 0d 09 2a 2a 74 65 78 |t %", 4)|;..**tex|
|000039a0| 74 20 3d 20 2a 2a 74 65 | 78 74 20 2b 20 33 3b 0d |t = **te|xt + 3;.|
|000039b0| 09 4d 75 6e 67 65 72 28 | 74 65 78 74 2c 20 31 2c |.Munger(|text, 1,|
|000039c0| 20 22 25 22 2c 20 31 2c | 20 2a 74 69 6d 65 20 2b | "%", 1,| *time +|
|000039d0| 20 31 2c 20 2a 2a 74 69 | 6d 65 29 3b 0d 09 2a 2a | 1, **ti|me);..**|
|000039e0| 74 65 78 74 20 3d 20 2a | 2a 74 65 78 74 20 2b 20 |text = *|*text + |
|000039f0| 2a 2a 74 69 6d 65 20 2d | 20 31 3b 0d 09 4d 75 6e |**time -| 1;..Mun|
|00003a00| 67 65 72 28 74 65 78 74 | 2c 20 31 2c 20 22 25 22 |ger(text|, 1, "%"|
|00003a10| 2c 20 31 2c 20 22 2e 20 | 4c 65 74 27 73 20 67 6f |, 1, ". |Let's go|
|00003a20| 21 22 2c 20 31 31 29 3b | 0d 09 2a 2a 74 65 78 74 |!", 11);|..**text|
|00003a30| 20 3d 20 2a 2a 74 65 78 | 74 20 2b 20 31 30 3b 0d | = **tex|t + 10;.|
|00003a40| 09 0d 09 4d 6f 76 65 48 | 48 69 28 74 65 78 74 29 |...MoveH|Hi(text)|
|00003a50| 3b 0d 09 48 4c 6f 63 6b | 28 74 65 78 74 29 3b 0d |;..HLock|(text);.|
|00003a60| 09 53 70 65 61 6b 54 65 | 78 74 28 63 68 61 6e 6e |.SpeakTe|xt(chann|
|00003a70| 65 6c 2c 20 28 50 74 72 | 29 28 2a 74 65 78 74 20 |el, (Ptr|)(*text |
|00003a80| 2b 20 31 29 2c 20 2a 2a | 74 65 78 74 29 3b 09 09 |+ 1), **|text);..|
|00003a90| 2f 2a 20 54 68 65 6e 20 | 73 70 65 61 6b 20 74 68 |/* Then |speak th|
|00003aa0| 65 20 74 65 78 74 20 74 | 68 72 6f 75 67 68 20 74 |e text t|hrough t|
|00003ab0| 68 65 20 63 68 61 6e 6e | 65 6c 20 2a 2f 0d 09 09 |he chann|el */...|
|00003ac0| 09 09 09 09 09 09 09 09 | 09 09 09 09 2f 2a 20 77 |........|..../* w|
|00003ad0| 65 20 67 6f 74 20 75 70 | 20 74 6f 70 2e 2e 2e 20 |e got up| top... |
|00003ae0| 2a 2f 0d 09 77 68 69 6c | 65 28 21 64 6f 6e 65 29 |*/..whil|e(!done)|
|00003af0| 20 7b 0d 09 09 57 61 69 | 74 4e 65 78 74 45 76 65 | {...Wai|tNextEve|
|00003b00| 6e 74 28 28 6d 44 6f 77 | 6e 4d 61 73 6b 20 7c 20 |nt((mDow|nMask | |
|00003b10| 6b 65 79 44 6f 77 6e 4d | 61 73 6b 29 2c 20 26 63 |keyDownM|ask), &c|
|00003b20| 68 6f 69 63 65 2c 20 31 | 35 2c 20 6e 69 6c 29 3b |hoice, 1|5, nil);|
|00003b30| 0d 09 09 73 77 69 74 63 | 68 20 28 63 68 6f 69 63 |...switc|h (choic|
|00003b40| 65 2e 77 68 61 74 29 20 | 7b 0d 09 09 09 63 61 73 |e.what) |{....cas|
|00003b50| 65 20 6d 6f 75 73 65 44 | 6f 77 6e 3a 0d 09 09 09 |e mouseD|own:....|
|00003b60| 09 77 68 65 72 65 20 3d | 20 63 68 6f 69 63 65 2e |.where =| choice.|
|00003b70| 77 68 65 72 65 3b 0d 09 | 09 09 09 73 77 69 74 63 |where;..|...switc|
|00003b80| 68 20 28 46 69 6e 64 57 | 69 6e 64 6f 77 28 77 68 |h (FindW|indow(wh|
|00003b90| 65 72 65 2c 20 26 77 68 | 69 63 68 5f 77 69 6e 64 |ere, &wh|ich_wind|
|00003ba0| 6f 77 29 29 20 7b 0d 09 | 09 09 09 09 63 61 73 65 |ow)) {..|....case|
|00003bb0| 20 69 6e 4d 65 6e 75 42 | 61 72 3a 0d 09 09 09 09 | inMenuB|ar:.....|
|00003bc0| 09 09 6d 65 6e 75 5f 63 | 68 6f 69 63 65 20 3d 20 |..menu_c|hoice = |
|00003bd0| 4d 65 6e 75 53 65 6c 65 | 63 74 28 77 68 65 72 65 |MenuSele|ct(where|
|00003be0| 29 3b 0d 09 09 09 09 09 | 09 69 66 20 28 48 69 57 |);......|.if (HiW|
|00003bf0| 6f 72 64 28 6d 65 6e 75 | 5f 63 68 6f 69 63 65 29 |ord(menu|_choice)|
|00003c00| 20 21 3d 20 30 29 20 7b | 0d 09 09 09 09 09 09 09 | != 0) {|........|
|00003c10| 64 6f 6e 65 20 3d 20 68 | 61 6e 64 6c 65 5f 6d 65 |done = h|andle_me|
|00003c20| 6e 75 73 28 6d 65 6e 75 | 5f 63 68 6f 69 63 65 2c |nus(menu|_choice,|
|00003c30| 20 70 72 65 66 73 29 3b | 0d 09 09 09 09 09 09 09 | prefs);|........|
|00003c40| 69 66 20 28 64 6f 6e 65 | 20 3d 3d 20 74 72 75 65 |if (done| == true|
|00003c50| 29 0d 09 09 09 09 09 09 | 09 09 73 74 6f 70 5f 73 |).......|..stop_s|
|00003c60| 70 65 65 63 68 28 63 68 | 61 6e 6e 65 6c 29 3b 0d |peech(ch|annel);.|
|00003c70| 09 09 09 09 09 09 7d 0d | 09 09 09 09 09 09 48 69 |......}.|......Hi|
|00003c80| 6c 69 74 65 4d 65 6e 75 | 28 30 29 3b 0d 09 09 09 |liteMenu|(0);....|
|00003c90| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 09 64 |...break|;......d|
|00003ca0| 65 66 61 75 6c 74 3a 0d | 09 09 09 09 09 09 73 74 |efault:.|......st|
|00003cb0| 6f 70 5f 73 70 65 65 63 | 68 28 63 68 61 6e 6e 65 |op_speec|h(channe|
|00003cc0| 6c 29 3b 0d 09 09 09 09 | 09 09 64 6f 6e 65 20 3d |l);.....|..done =|
|00003cd0| 20 74 72 75 65 3b 0d 09 | 09 09 09 09 09 62 72 65 | true;..|.....bre|
|00003ce0| 61 6b 3b 0d 09 09 09 09 | 7d 0d 09 09 09 09 62 72 |ak;.....|}.....br|
|00003cf0| 65 61 6b 3b 0d 09 09 09 | 63 61 73 65 20 6b 65 79 |eak;....|case key|
|00003d00| 44 6f 77 6e 3a 0d 09 09 | 09 09 73 74 6f 70 5f 73 |Down:...|..stop_s|
|00003d10| 70 65 65 63 68 28 63 68 | 61 6e 6e 65 6c 29 3b 0d |peech(ch|annel);.|
|00003d20| 09 09 09 09 64 6f 6e 65 | 20 3d 20 74 72 75 65 3b |....done| = true;|
|00003d30| 0d 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 7d 0d |.....bre|ak;...}.|
|00003d40| 09 09 69 66 20 28 53 70 | 65 65 63 68 42 75 73 79 |..if (Sp|eechBusy|
|00003d50| 28 29 20 3d 3d 20 30 29 | 0d 09 09 09 64 6f 6e 65 |() == 0)|....done|
|00003d60| 20 3d 20 74 72 75 65 3b | 0d 09 7d 0d 09 0d 09 48 | = true;|..}....H|
|00003d70| 55 6e 6c 6f 63 6b 28 74 | 65 78 74 29 3b 09 0d 09 |Unlock(t|ext);...|
|00003d80| 0d 09 44 69 73 70 6f 73 | 65 53 70 65 65 63 68 43 |..Dispos|eSpeechC|
|00003d90| 68 61 6e 6e 65 6c 28 63 | 68 61 6e 6e 65 6c 29 3b |hannel(c|hannel);|
|00003da0| 09 09 09 09 09 09 2f 2a | 20 41 6e 64 20 63 6c 65 |....../*| And cle|
|00003db0| 61 6e 20 75 70 2e 20 2a | 2f 0d 09 44 69 73 70 6f |an up. *|/..Dispo|
|00003dc0| 73 65 44 69 61 6c 6f 67 | 28 76 6f 69 63 65 5f 64 |seDialog|(voice_d|
|00003dd0| 6c 6f 67 29 3b 0d 09 44 | 69 73 70 6f 73 65 48 61 |log);..D|isposeHa|
|00003de0| 6e 64 6c 65 28 6d 6f 6e | 74 68 29 3b 0d 09 44 69 |ndle(mon|th);..Di|
|00003df0| 73 70 6f 73 65 48 61 6e | 64 6c 65 28 64 61 79 29 |sposeHan|dle(day)|
|00003e00| 3b 0d 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |;..Dispo|seHandle|
|00003e10| 28 77 65 65 6b 64 61 79 | 29 3b 0d 09 44 69 73 70 |(weekday|);..Disp|
|00003e20| 6f 73 65 48 61 6e 64 6c | 65 28 67 72 65 65 74 69 |oseHandl|e(greeti|
|00003e30| 6e 67 29 3b 0d 09 44 69 | 73 70 6f 73 65 48 61 6e |ng);..Di|sposeHan|
|00003e40| 64 6c 65 28 74 65 78 74 | 29 3b 0d 09 44 69 73 70 |dle(text|);..Disp|
|00003e50| 6f 73 65 48 61 6e 64 6c | 65 28 74 69 6d 65 29 3b |oseHandl|e(time);|
|00003e60| 0d 09 43 6c 6f 73 65 52 | 65 73 46 69 6c 65 28 70 |..CloseR|esFile(p|
|00003e70| 72 65 66 73 5f 66 69 6c | 65 5f 72 65 66 6e 75 6d |refs_fil|e_refnum|
|00003e80| 29 3b 0d 09 46 6c 75 73 | 68 56 6f 6c 28 4e 65 77 |);..Flus|hVol(New|
|00003e90| 53 74 72 69 6e 67 28 22 | 5c 70 22 29 2c 20 76 6f |String("|\p"), vo|
|00003ea0| 6c 5f 72 65 66 6e 75 6d | 29 3b 0d 7d 0d 09 09 00 |l_refnum|);.}....|
|00003eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f00| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 5a |........|.......Z|
|00003f10| 20 20 20 20 3d 20 7b 30 | 78 32 46 33 43 2c 30 78 | = {0|x2F3C,0x|
|00003f20| 38 30 31 36 2c 30 78 30 | 30 33 32 2c 30 78 41 38 |8016,0x0|032,0xA8|
|00003f30| 09 57 65 6c 63 6f 6d 65 | 2e 63 02 00 00 00 54 45 |.Welcome|.c....TE|
|00003f40| 58 54 4b 41 48 4c 01 00 | 00 1a 00 c0 00 00 00 00 |XTKAHL..|........|
|00003f50| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 1a 00 c0 |..TEXTKA|HL......|
|00003f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f70| 00 00 a8 93 03 67 00 00 | 3e 2f 00 00 01 ea 4c 6f |.....g..|>/....Lo|
|00003f80| 63 73 2c 0d 20 20 20 20 | 4a 75 73 74 53 74 79 6c |cs,. |JustStyl|
|00003f90| 65 43 6f 64 65 20 73 74 | 79 6c 65 52 75 6e 50 6f |eCode st|yleRunPo|
|00003fa0| 73 69 74 69 6f 6e 2c 50 | 6f 69 6e 74 20 6e 75 6d |sition,P|oint num|
|00003fb0| 65 72 2c 50 6f 69 6e 74 | 20 64 65 6e 6f 6d 29 0d |er,Point| denom).|
|00003fc0| 20 20 20 20 3d 20 7b 30 | 78 32 46 33 43 2c 30 78 | = {0|x2F3C,0x|
|00003fd0| 38 30 31 41 2c 30 78 30 | 30 33 34 2c 30 78 41 38 |801A,0x0|034,0xA8|
|00003fe0| 42 35 7d 3b 20 0d 70 61 | 73 63 61 6c 20 46 69 78 |B5}; .pa|scal Fix|
|00003ff0| 65 64 20 4e 50 6f 72 74 | 69 6f 6e 54 65 78 74 28 |ed NPort|ionText(|
|00004000| 00 00 00 0a 00 00 3a dd | 02 2f 00 00 00 00 00 00 |......:.|./......|
|00004010| 00 28 00 01 00 26 00 00 | 3a b1 02 2d 00 3e dc e0 |.(...&..|:..-.>..|
|00004020| 80 00 00 e8 01 65 01 bd | 02 78 94 20 00 00 00 00 |.....e..|.x. ....|
|00004030| 00 00 07 63 68 6f 69 63 | 65 20 00 00 00 52 00 04 |...choic|e ...R..|
|00004040| 00 00 23 c0 00 00 23 c0 | 0d 68 61 6e 64 6c 65 5f |..#...#.|.handle_|
|00004050| 6d 65 6e 75 73 00 00 00 | 2a b7 00 00 2a b7 05 6d |menus...|*...*..m|
|00004060| 61 69 6e 00 00 00 05 f2 | 00 00 05 f2 0b 70 72 65 |ain.....|.....pre|
|00004070| 66 73 5f 69 6e 69 74 00 | 00 00 39 e1 00 00 39 e1 |fs_init.|..9...9.|
|00004080| 0f 53 70 65 61 6b 20 68 | 65 72 65 2e 2e 2e 2e 00 |.Speak h|ere.....|
|00004090| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 5a |........|.......Z|
|000040a0| 00 15 65 d0 0c dc 00 00 | 00 1c 00 5a 00 02 42 4b |..e.....|...Z..BK|
|000040b0| 50 54 00 00 00 1a 44 54 | 56 55 00 00 00 26 4d 50 |PT....DT|VU...&MP|
|000040c0| 53 52 00 00 00 32 32 bc | ff ff 00 00 00 00 00 00 |SR...22.|........|
|000040d0| 00 00 61 30 ff ff 00 00 | 00 0e 00 00 00 00 03 ef |..a0....|........|
|000040e0| ff ff 00 00 00 3a 00 00 | 00 00 00 00 00 00 00 00 |.....:..|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+